-
Notifications
You must be signed in to change notification settings - Fork 8
/
release.sh
executable file
·26 lines (25 loc) · 936 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -e
if [ $# -ne 1 ]
then
echo "Usage: ./`basename $0` <VERSION>"
# `basename $0` is the script's filename.
exit 1
fi
VERSION=$1
git pull origin master
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
## test build works
mvn clean install
git commit -am "prepare for release $VERSION"
git tag -a $VERSION -m "$VERSION"
git push origin $VERSION
mvn versions:set -DnextSnapshot=true -DgenerateBackupPoms=false
git commit -am "set versions to next snapshot"
git push origin master
echo =========================================================================
echo At this point the tag has been pushed to the git repository on GitHub
echo and you should go to the GitHub UI to indicate that that tag is the
echo latest release which will trigger the workflow that pushes the versioned
echo binaries to Maven Central.
echo =========================================================================