summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-01-08 19:26:03 +0100
committerRobin Gareus <robin@gareus.org>2015-01-08 20:18:09 +0100
commitc1ccf8e28ec6d11508c0ae6c9d1265dbe71f15be (patch)
tree026eb6bc1a4cec4f5499719bf981fd5ed1a7d6cd /wscript
parent87f5f333ce4add0c8b0661db0fde8fc5ac86a0d0 (diff)
prepare for release candidate tags:
regexp: /[0—9]+-[0-9]+(-rc[0-9]*)?/ <Major>-<Minor>[-rc[<num>]] valid tag examples: 4.0, 4.1-rc3, 5.0-rc
Diffstat (limited to 'wscript')
-rw-r--r--wscript10
1 files changed, 5 insertions, 5 deletions
diff --git a/wscript b/wscript
index aecc85a5c2..e545b42b61 100644
--- a/wscript
+++ b/wscript
@@ -147,16 +147,16 @@ else:
rev = fetch_tarball_revision ()
#
-# rev is now of the form MAJOR.MINOR-rev-commit
-# or, if right at the same rev as a release, MAJOR.MINOR
+# rev is now of the form MAJOR.MINOR[-rcX]-rev-commit
+# or, if right at the same rev as a release, MAJOR.MINOR[-rcX]
#
-parts = rev.split ('.')
+parts = rev.split ('.', 1)
MAJOR = parts[0]
-other = parts[1].split ('-')
+other = parts[1].split('-', 1)
MINOR = other[0]
if len(other) > 1:
- MICRO = other[1]
+ MICRO = other[1].rsplit('-',1)[0].replace('-','.')
else:
MICRO = '0'