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 5, 2021
1 parent 52498e7 commit 3902e85
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.class

# versions-maven-plugin pom backup
*.xml.versionsBackup

# Mobile Tools for Java (J2ME)
.mtj.tmp/

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 3902e85

Please sign in to comment.