Skip to content

Commit 42f23ee

Browse files
committed
!deploy v0.1.0 - First release after fixes to enable passing tests in PS5.1
## 0.1.0 - Initial release to the PowerShell Gallery - Included functions are `Protect-PEMString` and `Unprotect-PEMString` - Fixed deployment issue
1 parent 0fd84d1 commit 42f23ee

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

psake.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,13 @@ $deployScriptBlock = {
277277
if ($versionToDeploy) {
278278
try {
279279
if ($ENV:BHBuildSystem -eq 'VSTS' -and -not [String]::IsNullOrEmpty($env:NugetApiKey)) {
280-
" Updating module version on manifest to [$($versionToDeploy)]"
281-
Update-Metadata -Path (Join-Path $outputModVerDir "$($env:BHProjectName).psd1") -PropertyName ModuleVersion -Value $versionToDeploy -Verbose
280+
if ($manifest.Version.ToString() -eq $versionToDeploy.ToStrin()) {
281+
" Manifest is already the expected version. Skipping manifest version update"
282+
}
283+
else {
284+
" Updating module version on manifest to [$($versionToDeploy)]"
285+
Update-Metadata -Path (Join-Path $outputModVerDir "$($env:BHProjectName).psd1") -PropertyName ModuleVersion -Value $versionToDeploy -Verbose
286+
}
282287
try {
283288
" Publishing version [$($versionToDeploy)] to PSGallery..."
284289
Publish-Module -Path $outputModVerDir -NuGetApiKey $env:NugetApiKey -Repository PSGallery -Verbose
@@ -340,7 +345,6 @@ $deployScriptBlock = {
340345
}
341346
if ($ENV:BHBuildSystem -eq 'VSTS' -and -not [String]::IsNullOrEmpty($env:TwitterAccessSecret) -and -not [String]::IsNullOrEmpty($env:TwitterAccessToken) -and -not [String]::IsNullOrEmpty($env:TwitterConsumerKey) -and -not [String]::IsNullOrEmpty($env:TwitterConsumerSecret)) {
342347
" Publishing tweet about new release..."
343-
$manifest = Import-PowerShellDataFile -Path (Join-Path $outputModVerDir "$($env:BHProjectName).psd1")
344348
$text = "#$($env:BHProjectName) v$($versionToDeploy) is now available on the #PSGallery! https://www.powershellgallery.com/packages/$($env:BHProjectName) #PowerShell"
345349
$manifest.PrivateData.PSData.Tags | Foreach-Object {
346350
$text += " #$($_)"

0 commit comments

Comments
 (0)