From f21a116ce8e01e9ff780b6ff7d54ea3a2f552335 Mon Sep 17 00:00:00 2001 From: Clemens Geibel Date: Wed, 11 May 2022 10:25:13 +0200 Subject: [PATCH] Finished release.sh --- release.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index ad45df6..ddcd39c 100755 --- a/release.sh +++ b/release.sh @@ -6,11 +6,15 @@ if [ -z "$VERSION" ] then echo "Error: VERSION needs to be set!" else + git pull echo "Release version: $VERSION" - # TODO: git tag and commit + while IFS='.' read -ra NUM; do echo "VERSION=${NUM[0]}.${NUM[1]}.$((NUM[2]+1)) \$@" > development-version.sh done <<< "$VERSION" - echo "Version bumped in file 'development-version.sh'" + + git add -A && git commit -m "Version ${VERSION}" + git tag -a ${VERSION} -m "Release ${VERSION}" + git push --follow-tags fi