misc: Improve tagging script

This way we can push the tag *after* all the builds succeed. If
something goes wrong, we can always delete our local tag and try again.
This commit is contained in:
James Shubin
2019-10-04 06:49:04 -04:00
parent d4043d3f86
commit 6a7d904fae
2 changed files with 5 additions and 7 deletions

View File

@@ -33,16 +33,12 @@ if [[ "${h}" == "${v}" ]]; then
exit 0
fi
# Give the user a chance to abort.
echo "WARN: About to tag \"${h}\" as \"${t}\" and push."
echo "Press ^C within 3s to abort."
sleep 3s
# Give the user some information.
echo "WARN: About to tag \"${h}\" as \"${t}\" locally."
# Tag and push.
# Tag and sign.
echo "release: tag $t" | git tag --file=- --sign $t
echo "INFO: Version $t is now tagged."
echo "INFO: Pushing $t to origin."
git push origin $t
# Be informative.
GIT_PAGER=cat git diff --stat "$v" "$t"