Skip to content
Browse files

add "make tag"

  • Loading branch information...
1 parent bd0d7cf commit f2317709a33347884a33ca86e8ec20fe1293b530 @kerphi committed
Showing with 26 additions and 0 deletions.
  1. +2 −0 Makefile
  2. +24 −0 tools/tag-release
View
2 Makefile
@@ -101,6 +101,8 @@ release: dummy
@tools/build-release --prod
@tools/build-release --dev
@tools/build-release --debug
+tag: dummy
+ @tools/tag-release
setup-bench: dummy
@npm install shelljs
View
24 tools/tag-release
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Script used to tag the release
+#
+
+set -e
+
+MY_PATH=$(cd ${0%/*} && echo $PWD/${0##*/})
+TOOL_PATH=`dirname "$MY_PATH"`
+VERSION=`$TOOL_PATH/get-version`
+
+git fetch --tags
+if [ "`git tag -l | grep $VERSION`" != "" ] ; then
+ echo "Warning: version $VERISON already exists. Aborting ..."
+ exit 2
+fi
+
+git tag -d latest
+git push origin :latest
+git tag -a -m "Version $VERSION" latest
+git tag -a -m "Version $VERSION" $VERSION
+git push --tags
+
+exit 0

0 comments on commit f231770

Please sign in to comment.
Something went wrong with that request. Please try again.