From d35f132d31241e7c2f09b4b2588a02c8a6ae249c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 20 Jun 2011 20:09:14 +0200 Subject: Prioritize version files over git version. 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") -- cgit v0.10.2-6-g49f6