From 6a7d904fae5014aabae8c91add220485108d485b Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 4 Oct 2019 06:49:04 -0400 Subject: [PATCH] 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. --- Makefile | 2 ++ misc/tag.sh | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 24ece68aef..03c37401f3 100644 --- a/Makefile +++ b/Makefile @@ -403,6 +403,8 @@ release_ubuntu-bionic: $(PKG_UBUNTU-BIONIC) release_archlinux: $(PKG_ARCHLINUX) releases/$(VERSION)/mgmt-release.url: $(PKG_FEDORA-30) $(PKG_FEDORA-29) $(PKG_DEBIAN-10) $(PKG_UBUNTU-BIONIC) $(PKG_ARCHLINUX) $(SHA256SUMS_ASC) + @echo "Pushing git tag $(VERSION) to origin..." + git push origin $(VERSION) @echo "Creating github release..." hub release create \ -F <( echo -e "$(VERSION)\n";echo "Verify the signatures of all packages before you use them. The signing key can be downloaded from https://purpleidea.com/contact/#pgp-key to verify the release." ) \ diff --git a/misc/tag.sh b/misc/tag.sh index e20e44ff0d..34a22c0337 100755 --- a/misc/tag.sh +++ b/misc/tag.sh @@ -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"