summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-03-13 22:00:38 +0000
committerCarl Hetherington <cth@carlh.net>2018-03-13 22:00:38 +0000
commitbbfdca5381b2c4ba53e79a616c21e539ffe8237e (patch)
treecfaeb249ea5cf0f48e95bbc2c002d34872fe80c4
parentfd5cfc82a6d421b42e71d96b91cc0ffb2c64e336 (diff)
Try to do versioning without two commits per version change.v2.13.0
-rw-r--r--wscript11
1 files changed, 10 insertions, 1 deletions
diff --git a/wscript b/wscript
index c5134f3c2..6a4854052 100644
--- a/wscript
+++ b/wscript
@@ -27,7 +27,16 @@ import distutils.spawn
from waflib import Logs, Context
APPNAME = 'dcpomatic'
-VERSION = '2.13.0devel'
+
+this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0]
+last_version = subprocess.Popen(shlex.split('git describe --abbrev=0'), stdout=subprocess.PIPE).communicate()[0]
+
+if this_version == '':
+ VERSION = '%sdevel' % last_version[1:].strip()
+else:
+ VERSION = this_version[1:].strip()
+
+print 'Version: %s' % VERSION
def options(opt):
opt.load('compiler_cxx')