Bimba.git

commit 9d7561f4387c560623001b44f3a528fae25a3796

Author: Adam Evyčędo <git@apiote.xyz>

add tagging option to release script

 release.sh | 15 ++++++++++++++-


diff --git a/release.sh b/release.sh
index 6e69dcd8abef856160d14f841729b0fc589e8b7f..3d8e82bbf0884ed1f50f229fd1afe6bc67c81556 100755
--- a/release.sh
+++ b/release.sh
@@ -11,8 +11,14 @@ phase=0
 case "$1" in
 	major|minor|patch) releaseType=$1 ;;
 	-c) phase=1 ;;
+	-t) phase=2 ;;
+	-h)
+		echo "release.sh (major|minor|patch)"
+		echo "release.sh (-c|-t)"
+		exit 0
+		;;
 	*)
-		echo "no release type given or -c given"
+		echo "no release type, -c, or -t given"
 		exit 1
 		;;
 esac
@@ -108,6 +114,13 @@ 	read -r yn
 	if [ "$yn" != 'y' ] && [ "$yn" != 'Y' ]; then
 		exit 1
 	fi
+	git tag -s -m "v${newVersionName}" "v${newVersionName}"
+	git push origin --tags
+	git switch develop
+	git merge master
+elif [ $phase -eq 2 ]
+then
+	newVersionName=$(grep 'versionName' app/build.gradle | tr -s ' ' | cut -d ' ' -f3 | tr -d '"')
 	git tag -s -m "v${newVersionName}" "v${newVersionName}"
 	git push origin --tags
 	git switch develop