File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,12 +203,16 @@ $deployScriptBlock = {
203203 if ($versionToDeploy ) {
204204 try {
205205 if ($ENV: BHBuildSystem -eq ' VSTS' -and -not [String ]::IsNullOrEmpty($env: NugetApiKey )) {
206- if ($manifest.Version.ToString () -eq $versionToDeploy.ToStrin ()) {
206+ $manifestPath = Join-Path $outputModVerDir " $ ( $env: BHProjectName ) .psd1"
207+ if (-not $manifest ) {
208+ $manifest = Import-PowerShellDataFile - Path $manifestPath
209+ }
210+ if ($manifest.ModuleVersion.ToString () -eq $versionToDeploy.ToString ()) {
207211 " Manifest is already the expected version. Skipping manifest version update"
208212 }
209213 else {
210214 " Updating module version on manifest to [$ ( $versionToDeploy ) ]"
211- Update-Metadata - Path ( Join-Path $outputModVerDir " $ ( $ env: BHProjectName ) .psd1 " ) - PropertyName ModuleVersion - Value $versionToDeploy - Verbose
215+ Update-Metadata - Path $manifestPath - PropertyName ModuleVersion - Value $versionToDeploy - Verbose
212216 }
213217 try {
214218 " Publishing version [$ ( $versionToDeploy ) ] to PSGallery..."
You can’t perform that action at this time.
0 commit comments