Skip to content

Commit

Permalink
Added environment variable for module name !deploy !release
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jun 21, 2017
1 parent 9577937 commit 6799ca7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Build/deploy.psdeploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ if (
$env:BHCommitMessage -match '!release'
)
{
Compress-Archive -Path $env:BHModulePath -DestinationPath $env:BHProjectPath\$ModuleName-$env:ModuleVersion.zip
if (-Not (Test-Path -Path $env:BHProjectPath\$ModuleName-$env:ModuleVersion.zip)) {
Compress-Archive -Path $env:BHModulePath -DestinationPath $env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip
if (-Not (Test-Path -Path $env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip)) {
Write-Error 'Failed to create archive for release'
}
"Created release asset $env:BHProjectPath\$ModuleName-$env:ModuleVersion.zip" |
"Created release asset $env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip" |
Write-Host

$ReleaseNotes = 'PLEASE FILL MANUALLY'
Expand All @@ -56,7 +56,7 @@ if (
$_
}
}
$ReleaseNotesSection += "See https://www.powershellgallery.com/packages/$ModuleName/$env:ModuleVersion"
$ReleaseNotesSection += "See https://www.powershellgallery.com/packages/$env:ModuleName/$env:ModuleVersion"
$ReleaseNotesSection = $ReleaseNotesSection | Where-Object { $_ -notlike '# *' -and $_ -ne '' }
if ($ReleaseNotesSection -is [array]) {
$ReleaseNotes = $ReleaseNotesSection -join "`n"
Expand Down
4 changes: 2 additions & 2 deletions Build/psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if (-Not $PSModule) {
Write-Error 'Did not find any module manifest'
}
$ModuleName = $PSModule.Directory.BaseName
$env:ModuleName = $PSModule.Directory.BaseName
$env:BHModulePath = $PSModule.Directory.FullName
$TestFile = "TestResults_PS$PSVersion`_$TimeStamp.xml"
Import-LocalizedData -BindingVariable Manifest -BaseDirectory $PSModule.Directory.FullName -FileName $PSModule.Name
Expand All @@ -37,7 +37,7 @@ Task Test -Depends Init {
if ($env:PSModulePath -notlike "$env:BHProjectPath;*") {
$env:PSModulePath = "$env:BHProjectPath;$env:PSModulePath"
}
$TestResults = Invoke-Pester -Path "$env:BHProjectPath\Tests" -PassThru -OutputFormat NUnitXml -OutputFile "$env:BHProjectPath\$TestFile" -CodeCoverage "$env:BHModulePath\$ModuleName.psm1"
$TestResults = Invoke-Pester -Path "$env:BHProjectPath\Tests" -PassThru -OutputFormat NUnitXml -OutputFile "$env:BHProjectPath\$TestFile" -CodeCoverage "$env:BHModulePath\$env:ModuleName.psm1"

# In Appveyor? Upload our tests! #Abstract this into a function?
if ($env:BHBuildSystem -eq 'AppVeyor') {
Expand Down
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 1.1.111
# 1.1.112

- Integrated updated scripts from PowerShell-CI
- Fixed test for property
Expand Down

0 comments on commit 6799ca7

Please sign in to comment.