Author: Adam Evyčędo <git@apiote.xyz>
conditional tag pushing in release
release.sh | 10 ++++++++++
diff --git a/release.sh b/release.sh index 3911f00b6ba62512d5e54885dcbc99f2a73de5be..6e69dcd8abef856160d14f841729b0fc589e8b7f 100755 --- a/release.sh +++ b/release.sh @@ -4,6 +4,8 @@ # SPDX-FileCopyrightText: Adam Evyčędo # # SPDX-License-Identifier: GPL-3.0-or-later +set -e + releaseType="" phase=0 case "$1" in @@ -95,9 +97,17 @@ fi git add app/build.gradle git add metadata/ git commit -S -m "release version $newVersionName ($newVersionCode)" + echo 'pushing …' git push git switch master git merge -S --no-ff -m "merge develop into master for version $newVersionName" develop + echo 'pushing …' + git push + echo 'tag and push tag?' + 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