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:
2
Makefile
2
Makefile
@@ -403,6 +403,8 @@ release_ubuntu-bionic: $(PKG_UBUNTU-BIONIC)
|
|||||||
release_archlinux: $(PKG_ARCHLINUX)
|
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)
|
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..."
|
@echo "Creating github release..."
|
||||||
hub release create \
|
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." ) \
|
-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." ) \
|
||||||
|
|||||||
10
misc/tag.sh
10
misc/tag.sh
@@ -33,16 +33,12 @@ if [[ "${h}" == "${v}" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Give the user a chance to abort.
|
# Give the user some information.
|
||||||
echo "WARN: About to tag \"${h}\" as \"${t}\" and push."
|
echo "WARN: About to tag \"${h}\" as \"${t}\" locally."
|
||||||
echo "Press ^C within 3s to abort."
|
|
||||||
sleep 3s
|
|
||||||
|
|
||||||
# Tag and push.
|
# Tag and sign.
|
||||||
echo "release: tag $t" | git tag --file=- --sign $t
|
echo "release: tag $t" | git tag --file=- --sign $t
|
||||||
echo "INFO: Version $t is now tagged."
|
echo "INFO: Version $t is now tagged."
|
||||||
echo "INFO: Pushing $t to origin."
|
|
||||||
git push origin $t
|
|
||||||
|
|
||||||
# Be informative.
|
# Be informative.
|
||||||
GIT_PAGER=cat git diff --stat "$v" "$t"
|
GIT_PAGER=cat git diff --stat "$v" "$t"
|
||||||
|
|||||||
Reference in New Issue
Block a user