diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-12-08 16:47:24 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-12-08 16:47:24 +0100 |
commit | 0a84deef91c88e382091f0d428bc1192afbe0adc (patch) | |
tree | 7fe28d3dcebaed904910c72b273c2bdeef312e30 /scripts/build-version.py | |
parent | e11c073e518139ca1729ea1e4a76c215b9abca53 (diff) | |
download | qtlocation-mapboxgl-0a84deef91c88e382091f0d428bc1192afbe0adc.tar.gz |
make sure it also works when there are no git tags
Diffstat (limited to 'scripts/build-version.py')
-rw-r--r-- | scripts/build-version.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/build-version.py b/scripts/build-version.py index 3b70f93749..864b5758a2 100644 --- a/scripts/build-version.py +++ b/scripts/build-version.py @@ -4,7 +4,13 @@ import sys, os, errno output_dir = sys.argv[1] -tag = map(int, sys.argv[2].split('.')) + +# When they're identical, the git describe can't find a tag and reports the rev instead. +if sys.argv[2] == sys.argv[3]: + tag = [0, 0, 0] +else: + tag = map(int, sys.argv[2].split('.')) + rev = sys.argv[3] |