summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-13 10:37:07 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-13 10:37:07 (GMT)
commit0db29475fcc818e4fa3cce14bb21009b02d1e387 (patch)
treec7cd5ba2684e6713ee365d5b99c3af887f8d20d8
parent7359f1a67ef1eeb8511a44019fd723102380c2cf (diff)
downloadswift-contrib-0db29475fcc818e4fa3cce14bb21009b02d1e387.zip
swift-contrib-0db29475fcc818e4fa3cce14bb21009b02d1e387.tar.bz2
Use a less ambiguous way of tagging version builds.
-rw-r--r--BuildTools/SCons/Version.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py
index 90bf0f8..9c690e5 100644
--- a/BuildTools/SCons/Version.py
+++ b/BuildTools/SCons/Version.py
@@ -1,9 +1,13 @@
-import subprocess, os, datetime
+import subprocess, os, datetime, re
def getGitBuildVersion(project) :
tag = git("describe --tags --exact --match \"" + project + "-*\"")
if tag :
return tag.rstrip()[len(project)+1:]
+ tag = git("describe --tags --match \"" + project + "-*\"")
+ m = re.match(project + "-(.*)-(.*)-(.*)", tag)
+ if m :
+ return m.group(1) + "-dev" + m.group(2)
def git(cmd) :
p = subprocess.Popen("git " + cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=(os.name != "nt"))