summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-20 18:32:23 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-20 18:32:23 (GMT)
commit4e72d079d8aa012185e445f334146f1e91db6a2d (patch)
tree40a1595bd30f93bbd628fbf52d92a523163b8206 /BuildTools
parentd0f5efabfe61347df011c3dab5e47a45b53e8b22 (diff)
parentd35f132d31241e7c2f09b4b2588a02c8a6ae249c (diff)
downloadswift-contrib-4e72d079d8aa012185e445f334146f1e91db6a2d.zip
swift-contrib-4e72d079d8aa012185e445f334146f1e91db6a2d.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Prioritize version files over git version. Improve the description in the Debian control file. Use a custom debian changelog.
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/Version.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py
index 993536a..57ef96d 100644
--- a/BuildTools/SCons/Version.py
+++ b/BuildTools/SCons/Version.py
@@ -18,16 +18,15 @@ def git(cmd) :
return gitVersion if p.wait() == 0 else None
def getBuildVersion(root, project) :
+ versionFilename = os.path.join(root, "VERSION." + project)
+ if os.path.isfile(versionFilename) :
+ f = open(versionFilename)
+ version = f.read().strip()
+ f.close()
+ return version
+
gitVersion = getGitBuildVersion(project)
if gitVersion :
return gitVersion
- else :
- versionFilename = os.path.join(root, "VERSION." + project)
- if os.path.isfile(versionFilename) :
- f = open(versionFilename)
- version = f.read().strip()
- f.close()
- return version
- else :
- # TODO: Add the current branch
- return datetime.date.today().strftime("%Y%m%d")
+
+ return datetime.date.today().strftime("%Y%m%d")