Handle forcing re-upload
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-06-03 10:34:19 +02:00
parent a1de7f10cb
commit 53cec2469b
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 16 additions and 1 deletions

17
abra
View File

@ -2223,12 +2223,27 @@ sub_recipe_release() {
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
git tag -aem "$latest_version_message" "$new_version"
else
git tag -am "$latest_version_message" "$new_version"
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
}
#######################################