Created
January 30, 2019 15:12
-
-
Save seogi1004/3f908d9cb13b4bb27002c99957db7a8b 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" | |
stage: patch | |
before_script: | |
- POM_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | |
- echo $POM_VERSION | |
script: | |
- git config --global user.name "alvin.h" | |
- git config --global user.email "[email protected]" | |
- git checkout $CI_COMMIT_REF_NAME | |
- git remote remove origin | |
- git remote add origin https://alvin.h:[email protected]/$CI_PROJECT_PATH.git | |
- 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