aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 14:27:43 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 14:28:18 -0700
commitf3fcc78f2801f9ebc4970e70467fa207be42ad56 (patch)
treea437a81c08a93d4232cefcbce6303734e5d28946
parentbcc026d8a264212722a6b6a110cad5cf0522fc42 (diff)
downloadgrv-f3fcc78f2801f9ebc4970e70467fa207be42ad56.tar.gz
grv-f3fcc78f2801f9ebc4970e70467fa207be42ad56.tar.xz
grv-f3fcc78f2801f9ebc4970e70467fa207be42ad56.zip
tag: script to tag a release number
-rwxr-xr-xtag18
1 files changed, 18 insertions, 0 deletions
diff --git a/tag b/tag
new file mode 100755
index 0000000..5721b57
--- /dev/null
+++ b/tag
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+project='grv'
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 version" 1>&2
+ exit 1
+fi
+
+if [ "$(git diff --cached | wc -l)" != 0 ]; then
+ echo "$0: changes already in git cache" 1>&2
+ exit 1
+fi
+
+echo "$1" > version
+git add version
+git commit -m "$project $1"
+git tag -a -m "$project $1" "$project-$1"