Skip to content

Commit

Permalink
Add support for SetDevVersion property (Azure#9565)
Browse files Browse the repository at this point in the history
For .NET builds the only case we want to not have
dev build numbers on our packages is when it is manually
queued and the SetDevVersion property isn't set to true.
All other cases should contain dev version numbers.
  • Loading branch information
weshaggard authored Jan 22, 2020
1 parent 44f22fc commit 80eaf10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ jobs:
echo "##vso[build.addbuildtag]Scheduled"
displayName: "Tag scheduled builds"
condition: and(eq(variables['Build.SourceBranchName'],'master'),eq(variables['Build.Reason'],'Schedule'))
- template: tools/daily-dev-build-variable/daily-dev-build-variable.yml@azure-sdk-tools
- pwsh: |
$skipDevBuildNumber = "false"
if ('$(Build.Reason)' -eq 'Manual') {
# For .NET builds the only case we want to not have dev build numbers on our packages is when it is manually queued and
# the SetDevVersion property isn't set to true. All other cases should contain dev version numbers.
if ('$(Build.Reason)' -eq 'Manual' -and '$(SetDevVersion)' -ne 'true') {
$skipDevBuildNumber = "true"
}
$versioningProperties = "/p:OfficialBuildId=$(OfficialBuildId) /p:SkipDevBuildNumber=$skipDevBuildNumber";
echo "##vso[task.setvariable variable=VersioningProperties]$versioningProperties"
displayName: "Setup Versioning Properties"
displayName: "Setup .NET specific versioning properties"
- task: DotNetCoreInstaller@2
displayName: "Use .NET Core sdk $(DotNetCoreSDKVersion)"
inputs:
Expand Down

0 comments on commit 80eaf10

Please sign in to comment.