Skip to content

Commit

Permalink
Replace build version number on CI with tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Sipkab committed May 17, 2020
1 parent 2de6756 commit c02a62f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Java IDE support for saker.build
Bundle-SymbolicName: saker.java.ide.eclipse;singleton:=true
Bundle-Version: 0.8.11.qualifier
Bundle-Version: 111.222.334.qualifier
Automatic-Module-Name: saker.java.ide.eclipse
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: saker.build.ide.eclipse;bundle-version="0.8.0",
Expand Down
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ pool:
vmImage: 'ubuntu-latest'

steps:
- script: |
set -e
TAGVER=$(echo $BUILD_SOURCEBRANCHNAME | sed -r 's/v(.*)/\1/')
sed -i -s 's/111.222.334.qualifier/$TAGVER.qualifier/g' META-INF/MANIFEST.MF
echo "New version: $(cat META-INF/MANIFEST.MF | grep Bundle-Version: "
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
displayName: 'Replace Bundle-Version'
- script: |
set -e
echo "##vso[task.setvariable variable=BUILD_VERSION_NUMBER]$(cat META-INF/MANIFEST.MF | grep Bundle-Version: | sed -r 's/Bundle-Version: (.*)\.qualifier/\1/')"
Expand Down

0 comments on commit c02a62f

Please sign in to comment.