summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-05-28 15:53:25 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-05-28 15:53:36 -0400
commit317a6c7f99798b2c050faf15e5baffc052e087c7 (patch)
tree89fab7c1ef0f8ef7da626eda2604bafd080633e0 /wscript
parentd96a6ed247acc5c24316c303756784f88c35443a (diff)
fix wscript to handle git revision ID that consists of just MAJOR.MINOR, as will happen if the repo is at the exact same rev as the MAJOR.MINOR tag
Diffstat (limited to 'wscript')
-rw-r--r--wscript6
1 files changed, 5 insertions, 1 deletions
diff --git a/wscript b/wscript
index 12997e7f82..ca69bcde3d 100644
--- a/wscript
+++ b/wscript
@@ -30,13 +30,17 @@ else:
#
# rev is now of the form MAJOR.MINOR-rev-commit
+# or, if right at the same rev as a release, MAJOR.MINOR
#
parts = rev.split ('.')
MAJOR = parts[0]
other = parts[1].split ('-')
MINOR = other[0]
-MICRO = other[1]
+if len(other) > 1:
+ MICRO = other[1]
+else:
+ MICRO = '0'
V = MAJOR + '.' + MINOR + '.' + MICRO
#