Last active
October 23, 2022 13:50
-
-
Save jglick/b4ece94b38f139a66d3333f7cc925099 to your computer and use it in GitHub Desktop.
Script to do a Maven release relatively safely
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
#!/bin/sh | |
set -e | |
git branch | |
git status -s | |
git pull | |
git log --patch-with-stat --irreversible-delete --find-renames @{u}.. | |
gitg | |
gh pr list || : | |
git tag --sort=version:refname | |
gh release list || : | |
echo -n 'Hit Enter to proceed: ' | |
read whatever | |
nice mvn -B release:prepare release:perform | |
gh release create $(git tag --sort=-version:refname | head -1) -t $(mvn -B -f target/checkout -Dexpression=project.version -q -DforceStdout help:evaluate) --generate-notes | |
git pull | |
mvn -DskipTests clean install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment