Created
January 8, 2019 10:53
-
-
Save seogi1004/a50c779e9ffdf7dd4f3d236b97213ea9 to your computer and use it in GitHub Desktop.
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
... | |
Patch: | |
image: maven:3.3.9 | |
only: | |
changes: | |
- "pom.xml" | |
refs: | |
- merge_requests | |
stage: patch | |
before_script: | |
- POM_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | |
- echo $POM_VERSION | |
- git config --global user.name "alvin.h" | |
- git config --global user.email "seogi777@gmail.com" | |
script: | |
- git checkout $CI_COMMIT_REF_NAME | |
- git remote remove origin | |
- git remote add origin $CI_REPOSITORY_URL | |
- git tag -a $POM_VERSION -m "Version created by gitlab-ci Build" | |
- git push origin --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment