Skip to content

Commit

Permalink
Revert release.sh to earlier full version (modified due to retrying t…
Browse files Browse the repository at this point in the history
…he release process)
  • Loading branch information
eputtone committed Oct 4, 2024
1 parent 19edc95 commit f4c7b6e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ valid_version() {
return 0
}

GIT_STATUS=$(git status --porcelain)
if [[ $GIT_STATUS ]]; then
echo "Error: unversioned or uncommitted files"
echo "Git status:"
echo $GIT_STATUS
exit 1
fi

if [[ $# -lt 3 ]]; then
echo "Usage: `basename $0` <previous_release_version_number> <new_release_version_number> <next_snapshot_version_number> [<gpg_passphrase>]"
echo "Example: `basename $0` 2.0.0 2.1.0 2.1.1 mypassphrase"
Expand Down Expand Up @@ -47,6 +55,16 @@ if [[ -n $1 ]]; then
fi
shift

prompt_continue "set version $RELEASE_VERSION to local git repository"

mvn versions:set -DnewVersion=$RELEASE_VERSION
sed -i -e "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" README.md
git commit -am "release $RELEASE_VERSION [ci skip]"

prompt_continue "push version $RELEASE_VERSION to remote git repository"

git push

prompt_continue "release version $RELEASE_VERSION to Maven Central"

mvn -Prelease clean deploy $GPG_PASSPHRASE
Expand Down

0 comments on commit f4c7b6e

Please sign in to comment.