@@ -67,26 +67,26 @@ extends:
6767
6868 - script : ./gradlew --no-daemon publishToMavenLocal -PmavenCentralPublishingEnabled=true -PmavenCentralSnapshotArtifactSuffix=""
6969 displayName : Publish to local Maven for verification
70- # condition: contains(variables['build.sourceBranch'], 'refs/tags/v')
70+ condition : contains(variables['build.sourceBranch'], 'refs/tags/v')
7171
72- # - script: ./gradlew --no-daemon publishToMavenLocal -PmavenCentralPublishingEnabled=true
73- # displayName: Publish to local Maven for verification
74- # condition: not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
72+ - script : ./gradlew --no-daemon publishToMavenLocal -PmavenCentralPublishingEnabled=true
73+ displayName : Publish to local Maven for verification
74+ condition : not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
7575
7676 - script : ./gradlew --no-daemon publishMavenPublicationToADORepository -PmavenCentralPublishingEnabled=true -PmavenCentralSnapshotArtifactSuffix=""
7777 displayName : Publish to local Maven ADO for ESRP
78- # condition: contains(variables['build.sourceBranch'], 'refs/tags/v')
78+ condition : contains(variables['build.sourceBranch'], 'refs/tags/v')
7979
80- # - script: ./gradlew --no-daemon publishMavenPublicationToADORepository -PmavenCentralPublishingEnabled=true
81- # displayName: Publish to local Maven ADO for ESRP
82- # condition: not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
80+ - script : ./gradlew --no-daemon publishMavenPublicationToADORepository -PmavenCentralPublishingEnabled=true
81+ displayName : Publish to local Maven ADO for ESRP
82+ condition : not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
8383
8484 - pwsh : |
8585 $contents = Get-Content gradle.properties -Raw
8686 $major = $contents | Select-String -Pattern 'mavenMajorVersion\s*=\s*([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
8787 $minor = $contents | Select-String -Pattern 'mavenMinorVersion\s*=\s*([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
8888 $patch = $contents | Select-String -Pattern 'mavenPatchVersion\s*=\s*([0-9]+)' | ForEach-Object { $_.Matches.Groups[1].Value }
89- # $snapshot_suffix = if ($Env:BRANCH_NAME.StartsWith('refs/tags/v')) { '' } else { '-SNAPSHOT' }
89+ $snapshot_suffix = if ($Env:BRANCH_NAME.StartsWith('refs/tags/v')) { '' } else { '-SNAPSHOT' }
9090 $version = "$major.$minor.$patch$snapshot_suffix"
9191 echo "Current version is $version"
9292 echo "##vso[task.setvariable variable=PACKAGE_VERSION;]$version"
@@ -112,11 +112,11 @@ extends:
112112 targetPath : " $(PACKAGE_PATH)"
113113
114114 - stage : deploy
115- # condition: and(or(contains(variables['build.sourceBranch'], 'refs/tags/v'), eq(variables['build.sourceBranch'], '${{ parameters.previewBranch }}')), succeeded())
115+ condition : and(or(contains(variables['build.sourceBranch'], 'refs/tags/v'), eq(variables['build.sourceBranch'], '${{ parameters.previewBranch }}')), succeeded())
116116 dependsOn : build
117117 jobs :
118118 - deployment : deploy_github
119- # condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
119+ condition : and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
120120 pool :
121121 name : Azure-Pipelines-1ESPT-ExDShared
122122 os : linux
@@ -192,7 +192,7 @@ extends:
192192
193193 - deployment : deploy_maven
194194 # snapshots are not supported by ESRP release for now, but they are planning to add support. When it happens, simply remove the condition
195- # condition: and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
195+ condition : and(contains(variables['build.sourceBranch'], 'refs/tags/v'), succeeded())
196196 pool :
197197 name : Azure-Pipelines-1ESPT-ExDShared
198198 os : linux
0 commit comments