diff options
author | B. Watson <urchlay@slackware.uk> | 2024-01-04 16:16:12 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-01-04 16:16:12 -0500 |
commit | 69341752a93edf39d9bedbe435d7543f4068ac65 (patch) | |
tree | c8cc7687299b20177717204f46faf242a56f96e5 | |
parent | c805a89e0944a8eb0f0db959db326be517221891 (diff) | |
download | hcalc-69341752a93edf39d9bedbe435d7543f4068ac65.tar.gz |
Makefile: Add release target.
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | makerelease.sh | 16 |
2 files changed, 20 insertions, 1 deletions
@@ -95,4 +95,7 @@ install: all done $(GZIP) -9f $(DESTDIR)$(MAN1DIR)/$(MANPAGE) -.PHONY: all clean realclean install +release: + sh makerelease.sh $(VERSION) + +.PHONY: all clean realclean install release diff --git a/makerelease.sh b/makerelease.sh new file mode 100644 index 0000000..86b0d88 --- /dev/null +++ b/makerelease.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +VERSION="$1" +if [ "$VERSION" = "" -o "$2" != "" ]; then + echo "Usage: makerelese.sh VERSION" + exit 1 +fi + +git rev-parse || exit 1 +if [ "$( git tag -l "$VERSION" )" != "" ]; then + echo "There's already a $VERSION tag, did you forget to update VERSION in the Makefile?" + exit 1 +fi + +git tag -a -m"Version $VERSION release." "$VERSION" +git push |