bump-tag
This commit is contained in:
parent
342da1ecca
commit
b105c02eba
38
bump-tag
Executable file
38
bump-tag
Executable file
|
@ -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
|
Loading…
Reference in a new issue