From 95c54ec42de7c7ad7d60862b9bc1c46f639ff33b Mon Sep 17 00:00:00 2001 From: David Kornel Date: Thu, 9 May 2024 08:42:05 +0200 Subject: [PATCH] Add script for change version and tag it for release (#56) Signed-off-by: David Kornel --- .github/scripts/prepare-tag-release.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .github/scripts/prepare-tag-release.sh diff --git a/.github/scripts/prepare-tag-release.sh b/.github/scripts/prepare-tag-release.sh new file mode 100755 index 0000000..8db9fd8 --- /dev/null +++ b/.github/scripts/prepare-tag-release.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Script change version and run build +# then adds changes and do a release commit +# then creates tag with version specified by argument +# user must then push tags using `git push --tags` and do a release in github + +TAG=$1 +echo "Tagging version to ${TAG}" + +mvn versions:set -DnewVersion=${TAG} +mvn clean install +git add "." +git diff --staged --quiet || git commit -m "Release ${TAG}" +git tag -a ${TAG} -m "${TAG}"