Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Dec 13, 2021
1 parent f613946 commit dec00f3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# Maven
target/
**/pom.xml.versionsBackup

# Eclipse
.settings/
Expand Down
22 changes: 22 additions & 0 deletions scripts/tag_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

if [[ ! $1 ]]; then
echo "Please provide a version string."
return
fi

version="$1"
snapshot="${version%.*}.$((${version##*.} + 1))-SNAPSHOT"

mvn versions:set -DnewVersion="$version"

git add .
git commit -S -m "Bump version to $version for release"
git tag -s "$version" -m "Release $version"

mvn clean package -am

mvn versions:set -DnewVersion="$snapshot"

git add .
git commit -S -m "Bump version to $snapshot for development"

0 comments on commit dec00f3

Please sign in to comment.