diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-04-22 21:30:21 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-04-22 21:30:21 (GMT) |
commit | b381d4fac4c4362ab534ab73875126cb5c6cd101 (patch) | |
tree | 984af532325b88d27342d2e77b9a470de4d7402c /BuildTools/SCons | |
parent | 280a613aef9b549cca41497c50e70052cebb4860 (diff) | |
parent | a3c9486f2f593220f5a9d4c4e57ac2bc7aa5bbf9 (diff) | |
download | swift-contrib-b381d4fac4c4362ab534ab73875126cb5c6cd101.zip swift-contrib-b381d4fac4c4362ab534ab73875126cb5c6cd101.tar.bz2 |
Merge branch 'swift-1.x'
* swift-1.x:
Fixed SCons not picking up the build version correctly in tarball build.
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/Tools/BuildVersion.py | 2 | ||||
-rw-r--r-- | BuildTools/SCons/Version.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/BuildTools/SCons/Tools/BuildVersion.py b/BuildTools/SCons/Tools/BuildVersion.py index 8b195cd..41e6d8d 100644 --- a/BuildTools/SCons/Tools/BuildVersion.py +++ b/BuildTools/SCons/Tools/BuildVersion.py @@ -8,7 +8,7 @@ def generate(env) : static const char* buildVersion = \"%(buildVersion)s\";\n #define SWIFT_VERSION_STRING \"%(buildVersion)s\";\n -""" % { "buildVersion" : Version.getBuildVersion(project) } +""" % { "buildVersion" : Version.getBuildVersion(env.Dir("#").abspath, project) } env.WriteVal(target, env.Value(buildVersion)) env.AddMethod(createBuildVersion, "BuildVersion") diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py index 4a2bf77..993536a 100644 --- a/BuildTools/SCons/Version.py +++ b/BuildTools/SCons/Version.py @@ -17,12 +17,12 @@ def git(cmd) : p.stdin.close() return gitVersion if p.wait() == 0 else None -def getBuildVersion(project) : +def getBuildVersion(root, project) : gitVersion = getGitBuildVersion(project) if gitVersion : return gitVersion else : - versionFilename = "VERSION." + project + versionFilename = os.path.join(root, "VERSION." + project) if os.path.isfile(versionFilename) : f = open(versionFilename) version = f.read().strip() |