Created
February 10, 2022 20:03
-
-
Save rasmuseeg/412d11efd72611e2afcde2a338d8f847 to your computer and use it in GitHub Desktop.
Azure variable template for verisoning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
version.counter: $[counter(format('{0}_{1}', variables['Build.DefinitionName'], variables['Build.SourceBranchName']), 1)] | |
version.suffix: $[format('alpha-{0}{1}', variables['Build.SourceBranchName'], variables['version.counter'])] # Unknown branches are WIP | |
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}: | |
version.suffix: $[format('rc-{0}{1}', variables['Build.SourceBranchName'], variables['version.counter'])] # Ready for release | |
${{ if eq(variables['Build.SourceBranchName'], 'main') }}: | |
version.suffix: '' # No suffix for releases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment