summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2014-07-15 14:45:28 (GMT)
committerSwift Review <review@swift.im>2014-10-01 12:15:02 (GMT)
commita2296b00c88df201b0eb58e867aeb17a87e6332c (patch)
tree9fdebba1b5e9202ca669786a41dd94f080ba5807 /BuildTools/SCons/Version.py
parenta24d8c0e93d70312fc90d5fdf6214ade9a475e92 (diff)
downloadswift-a2296b00c88df201b0eb58e867aeb17a87e6332c.zip
swift-a2296b00c88df201b0eb58e867aeb17a87e6332c.tar.bz2
Port many of Isode's local fixes upstream
Includes fixes to: Build with new Visual Studio and Boost Avoid error caused when Avahi is present but Qt is not Make declaration of XMPPRosterImpl::addContact consistent with implementation Includes enhancements to: Allow user-configurable mt.exe Allow splitting openssl paths Allow disabling gconf lookup Make idn support optional Allow disabling various library detections Remove use of non-Python2.4 features in sconscripts Test-Information: Builds Change-Id: Iee91ee80291a8bdf87cc169c915e4dad1cc1055b
Diffstat (limited to 'BuildTools/SCons/Version.py')
-rw-r--r--BuildTools/SCons/Version.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py
index f98a8b9..2f3b5a5 100644
--- a/BuildTools/SCons/Version.py
+++ b/BuildTools/SCons/Version.py
@@ -10,7 +10,7 @@ def getGitBuildVersion(root, project) :
if m :
return m.group(1) + "-dev" + m.group(2)
return None
-
+
def git(cmd, root) :
full_cmd = "git " + cmd
p = subprocess.Popen(full_cmd, cwd=root, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=(os.name != "nt"))
@@ -19,7 +19,9 @@ def git(cmd, root) :
# if error:
# print "Git error: " + error
p.stdin.close()
- return gitVersion if p.wait() == 0 else None
+ if p.wait() == 0 :
+ return gitVersion
+ return None
def getBuildVersion(root, project) :
versionFilename = os.path.join(root, "VERSION." + project)
@@ -29,7 +31,7 @@ def getBuildVersion(root, project) :
f.close()
return version
- gitVersion = getGitBuildVersion(root, project)
+ gitVersion = getGitBuildVersion(root, project)
if gitVersion :
return gitVersion
@@ -59,9 +61,8 @@ def convertToWindowsVersion(version) :
build_string = alpha_match.group(1)
if len(build_string) > 0 :
- build_match = re.match("^-dev(\d+)", build_string)
+ build_match = re.match("^-dev(\d+)", build_string)
if build_match :
patch += int(build_match.group(1))
return (major, minor, patch)
-