From e57ea7b4369c0904e6f1227f0af6b4c57c8dfca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Mon, 16 Apr 2018 17:16:16 +0200 Subject: [PATCH] Make releasetfw ain't joke no more --- hack/tfw.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hack/tfw.sh b/hack/tfw.sh index d2921c0..b22e3f4 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -39,8 +39,7 @@ release_baseimage() read -p "Tag and push new TFW version \"${TAG}\"? [y/N]" -r && echo if [[ $REPLY =~ ^(y|Y|yes|Yes|YES)$ ]] then - git tag -s -m "$1" "$TAG" - git push origin $TAG + TAG="$TAG" force_push_tag fi } @@ -55,6 +54,14 @@ check_drone_releasename() fi } +force_push_tag() +{ + git tag -d "$TAG" > /dev/null 2>&1 || : + git push --delete origin "$TAG" > /dev/null 2>&1 || : + git tag -s -m "$1" "$TAG" + git push origin "$TAG" +} + baseimage_releasename() { VERSION="$(cat VERSION | head -n 1)"