summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-30 16:51:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-30 16:51:00 (GMT)
commit1bbf5a4f431ce3aab4c851c71438f3d2e468a866 (patch)
tree0c3c1b3a7357add1d0ba965e9be981258390290f /BuildTools
parentd0c3cf701102d08afd253f515df74f33ffeed3cc (diff)
parent0fe3d2b3f37bcd2fa2cf66979e236e993823390f (diff)
downloadswift-1bbf5a4f431ce3aab4c851c71438f3d2e468a866.zip
swift-1bbf5a4f431ce3aab4c851c71438f3d2e468a866.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Filter out some extra headers in install dir. Split off libswiften package. Only install the necessary files in the Debian package.
Diffstat (limited to 'BuildTools')
-rwxr-xr-xBuildTools/GetBuildVersion.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/BuildTools/GetBuildVersion.py b/BuildTools/GetBuildVersion.py
index a362574..007fec8 100755
--- a/BuildTools/GetBuildVersion.py
+++ b/BuildTools/GetBuildVersion.py
@@ -1,9 +1,21 @@
#!/usr/bin/env python
-import sys
+import sys, re
sys.path.append("SCons")
import Version, os.path
-assert(len(sys.argv) == 2)
+assert(len(sys.argv) >= 2)
-print Version.getBuildVersion(os.path.dirname(sys.argv[0] + "/.."), sys.argv[1])
+only_major = False
+if "--major" in sys.argv :
+ only_major = True
+
+if only_major :
+ v = Version.getBuildVersion(os.path.dirname(sys.argv[0] + "/.."), sys.argv[1])
+ version_match = re.match("(\d+)\.(\d+).*", v)
+ if version_match :
+ print version_match.group(1)
+ else :
+ print "0"
+else :
+ print Version.getBuildVersion(os.path.dirname(sys.argv[0] + "/.."), sys.argv[1])