diff --git a/.pipelines/templates/linux.yml b/.pipelines/templates/linux.yml index 0ab4f54e4f..95f8be4988 100644 --- a/.pipelines/templates/linux.yml +++ b/.pipelines/templates/linux.yml @@ -77,7 +77,14 @@ jobs: Start-PSBootstrap $null = New-Item -ItemType Directory -Path $buildWithSymbolsPath -Force -Verbose - Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath @params -Clean -PSModuleRestore + + $ReleaseTagParam = @{} + + if ($env:RELEASETAGVAR) { + $ReleaseTagParam['ReleaseTag'] = $env:RELEASETAGVAR + } + + Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath @params -Clean -PSModuleRestore @ReleaseTagParam $outputPath = Join-Path '$(ob_outputDirectory)' 'psoptions' $null = New-Item -ItemType Directory -Path $outputPath -Force diff --git a/.pipelines/templates/mac.yml b/.pipelines/templates/mac.yml index 4b46cfff46..9423d2816c 100644 --- a/.pipelines/templates/mac.yml +++ b/.pipelines/templates/mac.yml @@ -56,7 +56,14 @@ jobs: # macos-10.15 does not allow creating a folder under root. Hence, moving the folder. Import-Module ./build.psm1 -Force - Start-PSBuild -Runtime 'osx-${{ parameters.buildArchitecture }}' -Configuration Release -PSModuleRestore -Clean -Output $(OB_OUTPUTDIRECTORY) + + $ReleaseTagParam = @{} + + if ($env:RELEASETAGVAR) { + $ReleaseTagParam['ReleaseTag'] = $env:RELEASETAGVAR + } + + Start-PSBuild -Runtime 'osx-${{ parameters.buildArchitecture }}' -Configuration Release -PSModuleRestore -Clean -Output $(OB_OUTPUTDIRECTORY) @ReleaseTagParam $artifactName = "macosBinResults-${{ parameters.buildArchitecture }}" $psOptPath = "$(OB_OUTPUTDIRECTORY)/psoptions.json" diff --git a/.pipelines/templates/windows-hosted-build.yml b/.pipelines/templates/windows-hosted-build.yml index e43ba5c0d8..81f5258a68 100644 --- a/.pipelines/templates/windows-hosted-build.yml +++ b/.pipelines/templates/windows-hosted-build.yml @@ -87,7 +87,14 @@ jobs: Start-PSBootstrap -Package $null = New-Item -ItemType Directory -Path $buildWithSymbolsPath -Force -Verbose - Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath -Clean -PSModuleRestore @params + + $ReleaseTagParam = @{} + + if ($env:RELEASETAGVAR) { + $ReleaseTagParam['ReleaseTag'] = $env:RELEASETAGVAR + } + + Start-PSBuild -Runtime $runtime -Configuration Release -Output $buildWithSymbolsPath -Clean -PSModuleRestore @params @ReleaseTagParam $refFolderPath = Join-Path $buildWithSymbolsPath 'ref' Write-Verbose -Verbose "refFolderPath: $refFolderPath"