diff --git a/build/pipelines/templates/extensions-variables.yml b/build/pipelines/templates/extensions-variables.yml index 06e79d31f..7bec9d1d3 100644 --- a/build/pipelines/templates/extensions-variables.yml +++ b/build/pipelines/templates/extensions-variables.yml @@ -1,10 +1,10 @@ - variables: - ${{ if not(contains(variables['Build.SourceBranch'], '/release/' )) }}: - buildNumberTemp: $(Build.BuildNumber) - ${{ if contains(variables['Build.SourceBranch'], '/release/' ) }}: - isReleaseBuildTemp: true - buildNumber: $[variables.buildNumberTemp] - isReleaseBuild: $[variables.isReleaseBuildTemp] - solution: '**/*.sln' - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' \ No newline at end of file +variables: + ${{ if and( not(contains(variables['Build.SourceBranch'], '/release/')), not(startsWith(variables['Build.SourceBranch'], 'refs/tags')) ) }}: + buildNumberTemp: $(Build.BuildNumber) + ${{ if or( contains(variables['Build.SourceBranch'], '/release/'), startsWith(variables['Build.SourceBranch'], 'refs/tags') ) }}: + isReleaseBuildTemp: true + buildNumber: $[variables.buildNumberTemp] + isReleaseBuild: $[variables.isReleaseBuildTemp] + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release'