diff --git a/eng/pipelines/templates/jobs/archetype-sdk-client.yml b/eng/pipelines/templates/jobs/archetype-sdk-client.yml index ef89732b40cdc..0e34b83dd0532 100644 --- a/eng/pipelines/templates/jobs/archetype-sdk-client.yml +++ b/eng/pipelines/templates/jobs/archetype-sdk-client.yml @@ -62,6 +62,7 @@ jobs: pwsh: true workingDirectory: $(Build.SourcesDirectory) filePath: eng/scripts/SetTestPipelineVersion.ps1 + arguments: '-BuildNumber $(Build.BuildNumber)' - script: | echo "##vso[build.addbuildtag]Scheduled" diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 7b9048ce10963..e2f808b83c634 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -70,6 +70,7 @@ stages: pwsh: true workingDirectory: $(Build.SourcesDirectory) filePath: eng/scripts/SetTestPipelineVersion.ps1 + arguments: '-BuildNumber $(Build.BuildNumber)' - task: UsePythonVersion@0 displayName: 'Use Python 3.6' diff --git a/eng/scripts/SetTestPipelineVersion.ps1 b/eng/scripts/SetTestPipelineVersion.ps1 index 302f0be77e600..b4e75785b5030 100644 --- a/eng/scripts/SetTestPipelineVersion.ps1 +++ b/eng/scripts/SetTestPipelineVersion.ps1 @@ -1,5 +1,11 @@ -# Overides the project file and CHANGELOG.md for the template project using the next publishable version +# Overides the project file and CHANGELOG.md for the template project. # This is to help with testing the release pipeline. + +param ( + [Parameter(mandatory = $true)] + $BuildNumber +) + . "${PSScriptRoot}\..\common\scripts\common.ps1" $latestTags = git tag -l "azure-sdk-template_*" $semVars = @() @@ -16,7 +22,9 @@ $semVarsSorted = [AzureEngSemanticVersion]::SortVersionStrings($semVars) LogDebug "Last Published Version $($semVarsSorted[0])" $newVersion = [AzureEngSemanticVersion]::ParseVersionString($semVarsSorted[0]) -$newVersion.IncrementAndSetToPrerelease() +$newVersion.PrereleaseLabel = "beta" +$newVersion.PrereleaseNumber = $BuildNumber + LogDebug "Version to publish [ $($newVersion.ToString()) ]" $pomFileContent = New-Object -TypeName XML