-
-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Script to create a new release | ||
# ------------------------------ | ||
|
||
# exit on error | ||
set -e | ||
|
||
# make sure we're on master | ||
BRANCH="$(git rev-parse --abbrev-ref HEAD)" | ||
if [[ "$BRANCH" != "master" ]]; then | ||
echo "You're on branch '$BRANCH', you should be on 'master'." | ||
exit | ||
fi | ||
|
||
# make sure README.md has been updated | ||
read -r -p "Has README.md been updated? (Y/n) " CONFIRM | ||
case "$CONFIRM" in | ||
n | N) exit ;; | ||
esac | ||
|
||
read -r -p "New version (x.y.z): " VERSION | ||
|
||
mvn versions:set -DgenerateBackupPoms=false -DnewVersion="$VERSION" | ||
git add . | ||
git commit -am "release $VERSION" | ||
git tag "$VERSION" | ||
|
||
read -r -p "Push master and tag $VERSION? (y/N) " CONFIRM | ||
case "$CONFIRM" in | ||
y | Y) git push --atomic origin master "$VERSION" ;; | ||
esac |