Last active
November 20, 2020 14:11
-
-
Save pdemanget/5f0307432492d300ba691aa37312df12 to your computer and use it in GitHub Desktop.
Using maven versions plugin to release
This file contains hidden or 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
# On release localement: | |
# - On laisse l'utilisateur choisir de pousser on pas son tag et son commit | |
# - Au choix remplacer l'install par un deploy, ou revenir sur le tag pour lancer le deploy. | |
# mvn -q versions:set -DnewVersion=1.1.0-SNAPSHOT -DprocessAllModules -DgenerateBackupPoms=false | |
JAVA_HOME=/opt/lib/jdk11/ | |
echo set RELEASE version | |
mvn -q versions:set -DremoveSnapshot -DprocessAllModules | |
version=$(mvn -B -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec ) | |
echo Will tag version $version | |
git add pom.xml | |
git add */pom.xml | |
git commit -m "[version] $version" | |
git tag v$version | |
mvn clean install | |
echo set SNAPSHOT version | |
mvn -q versions:set -DnextSnapshot -DprocessAllModules | |
version=$(mvn -B -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec ) | |
mvn -q versions:commit | |
git add pom.xml | |
git add */pom.xml | |
git commit -m "[version] $version" | |
git tag v$version | |
echo Updated SNAPSHOT to version $version | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment