summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-01-06 02:54:01 +1300
committerLeith Bade <leith@mapbox.com>2015-01-06 02:54:01 +1300
commit8e657bc485faf5633db03cfb0b00c51045e769b0 (patch)
treee7443a0fb020e40fcd23ea671707818540e03f7b /scripts
parentff87965f9201b547e9e75ca61ba8f9672a0b4d3b (diff)
downloadqtlocation-mapboxgl-8e657bc485faf5633db03cfb0b00c51045e769b0.tar.gz
Handle tags with leading non-numeric chars
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build-version.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/build-version.py b/scripts/build-version.py
index b768f7f43c..3fe789185c 100644
--- a/scripts/build-version.py
+++ b/scripts/build-version.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import sys, os, errno
+import sys, os, errno, re
output_dir = sys.argv[1]
@@ -13,7 +13,8 @@ else:
if sys.argv[2] == sys.argv[3]:
tag = [0, 0, 0]
else:
- tag = map(int, sys.argv[2].split('.'))
+ ver = re.sub("[^0-9.]", "", sys.argv[2])
+ tag = map(int, ver.split('.'))
rev = sys.argv[3][0:8]