Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Commit

Permalink
added contrib/gittag
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiros Ioannou committed Oct 11, 2014
1 parent 06b5e8c commit cf94557
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contrib/gittag
@@ -0,0 +1,19 @@
#!/bin/bash


lasthash=`git log --decorate=full --all --pretty=format:'%h %d' |grep 'refs/tags'|head -1|awk '{print $1}'`
lasttag=`git describe --tags $lasthash`

echo "Previous tag was $lasttag"

read -e -p "Enter ${CYAN}new tag${OFF}: " -i "$newtag" newtag

read -e -p "Press enter to tag $newtag: "

gitbase=`git rev-parse --show-toplevel`
echo $newtag > $gitbase/VERSION
git add $gitbase/VERSION
git commit -m "Set version to $newtag"
git push origin
git tag -a $newtag -m "Tagged version:$newtag"
git push --tags

0 comments on commit cf94557

Please sign in to comment.