diff options
-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 |