summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-05-25 20:46:13 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-05-25 20:54:53 (GMT)
commit95a8998917591fdd77009f606bd55ece22f84950 (patch)
treecf6d1025c17599ecc2ec4bdabddf24b9719ce941 /BuildTools/SCons/Tools
parentee9eff16cd7024bdbd889bab7612c63bcfe3cbe9 (diff)
downloadswift-contrib-95a8998917591fdd77009f606bd55ece22f84950.zip
swift-contrib-95a8998917591fdd77009f606bd55ece22f84950.tar.bz2
Pick up build version from git tag (if present).
Diffstat (limited to 'BuildTools/SCons/Tools')
-rw-r--r--BuildTools/SCons/Tools/BuildVersion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BuildTools/SCons/Tools/BuildVersion.py b/BuildTools/SCons/Tools/BuildVersion.py
index 530ef8a..5edc79e 100644
--- a/BuildTools/SCons/Tools/BuildVersion.py
+++ b/BuildTools/SCons/Tools/BuildVersion.py
@@ -3,11 +3,11 @@ import SCons.Util
import Version
def generate(env) :
- def createBuildVersion(env, target, version = None) :
+ def createBuildVersion(env, target, project) :
buildVersion = """#pragma once
static const char* buildVersion = \"%(buildVersion)s\";\n
-""" % { "buildVersion" : Version.getBuildVersion(version) }
+""" % { "buildVersion" : Version.getBuildVersion(project) }
env.WriteVal(target, env.Value(buildVersion))
env.AddMethod(createBuildVersion, "BuildVersion")