diff options
author | Robin Gareus <robin@gareus.org> | 2015-01-08 19:26:03 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-01-08 20:18:09 +0100 |
commit | c1ccf8e28ec6d11508c0ae6c9d1265dbe71f15be (patch) | |
tree | 026eb6bc1a4cec4f5499719bf981fd5ed1a7d6cd /wscript | |
parent | 87f5f333ce4add0c8b0661db0fde8fc5ac86a0d0 (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-- | wscript | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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' |