summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2013-10-31 21:54:02 +0100
committerLeif Johansson <leifj@sunet.se>2013-10-31 21:54:02 +0100
commit047f2d2cc8ede977c363adece1791f1a472f5a39 (patch)
treef45077a469a5761fd7802794dcc7427e6b5ab479
parentc980518e8e7edfdd8141ceb8551117a284c1a644 (diff)
parentb105c02ebac320e812c861a6cb7a0e1d1788637e (diff)
Merge branch 'multiverse'
-rwxr-xr-xbump-tag38
1 files changed, 38 insertions, 0 deletions
diff --git a/bump-tag b/bump-tag
new file mode 100755
index 0000000..5d91b82
--- /dev/null
+++ b/bump-tag
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+set -e
+
+test -f cosmos.conf && . ./cosmos.conf
+
+deftag=`basename $PWD`
+tagpfx=${tag:="$deftag"}
+
+last_tag=`git tag -l "${tagpfx}-*"|sort|tail -1`
+
+git tag -v $last_tag
+
+PAGER=cat git diff $last_tag..master
+
+iter=1
+ok=
+while test -z "$ok"; do
+ this_tag=$(date +${tagpfx}-%Y-%m-%d-v`printf "%02d" $iter`)
+ iter=`expr $iter + 1`
+ case `(echo $this_tag; echo $last_tag) | sort | tail -1` in
+ $last_tag)
+ ;;
+ $this_tag)
+ ok=yes
+ ;;
+ esac
+done
+
+echo using new tag $this_tag
+echo ONLY SIGN IF YOU APPROVE OF VERIFICATION AND DIFF ABOVE
+
+# GITTAGEXTRA is for putting things like "-u 2117364A"
+
+git tag $GITTAGEXTRA -m bump. -s $this_tag
+
+git push
+git push --tags