Handle forcing re-upload

This commit is contained in:
decentral1se 2021-06-03 10:34:19 +02:00
parent a1de7f10cb
commit 53cec2469b
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A

17
abra
View File

@ -2223,12 +2223,27 @@ sub_recipe_release() {
fi fi
fi fi
test "$force" = "true" && git tag -d "$new_version" if [ "$force" = "true" ]; then
git tag -d "$new_version" || true
git push origin --delete "$new_version" || true
debug "Deleted local tag and remote tag if present"
fi
if [ "$abra___no_prompt" = "false" ]; then if [ "$abra___no_prompt" = "false" ]; then
git tag -aem "$latest_version_message" "$new_version" git tag -aem "$latest_version_message" "$new_version"
else else
git tag -am "$latest_version_message" "$new_version" git tag -am "$latest_version_message" "$new_version"
fi fi
if [ "$abra___no_prompt" = "false" ]; then
read -rp "Git push this new tag? [y/N]? " choice
if [ "${choice,,}" != "y" ]; then
git push --force
fi
else
git push --force
fi
} }
####################################### #######################################