From 17342b7c5dfcfc11317664bbbf448bcb9c5585a7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 12 Sep 2015 15:39:36 +0200 Subject: [PATCH] add a release-tagging script --- s/release | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 s/release diff --git a/s/release b/s/release new file mode 100755 index 000000000..4dd8db5b8 --- /dev/null +++ b/s/release @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import os +import sys + +template="""#define VERSION_MAJOR %s +#define VERSION_MINOR %s +#define VERSION_BUILD %s +""" + +def new_version(ver): + sp = ver.split(".") + sp = (sp[0], sp[1], sp[2]) + file = open("src/buildno.h", "w") + file.write(template % sp) + file.close() + os.system("git add src/buildno.h") + os.system("git commit -m 'release version %s'" % ver) + os.system("git tag -f version-%s" % ver) + +new_version(sys.argv[1])