Try to do versioning without two commits per version change. v2.13.0
authorCarl Hetherington <cth@carlh.net>
Tue, 13 Mar 2018 22:00:38 +0000 (22:00 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 13 Mar 2018 22:00:38 +0000 (22:00 +0000)
wscript

diff --git a/wscript b/wscript
index c5134f3c29ef1ed81f76e800cad4d4ab84933779..6a4854052ab6ea2176f2290e31ad3fcae41edea9 100644 (file)
--- a/wscript
+++ b/wscript
@@ -27,7 +27,16 @@ import distutils.spawn
 from waflib import Logs, Context
 
 APPNAME = 'dcpomatic'
 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')
 
 def options(opt):
     opt.load('compiler_cxx')