aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--makerelease.sh16
2 files changed, 20 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index beb6221..a937a0d 100644
--- a/Makefile
+++ b/Makefile
@@ -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