mirror of
https://github.com/ksherlock/prez.git
synced 2026-10-22 06:02:58 +00:00
fix version matching. final is assumed and a missing release no longer errors
This commit is contained in:
1 parent
6a8455af50
commit
f63135c600
2 files changed
+6
-3
No files matched your search
@@ -1,3 +1,6 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
rIcon(
|
||||
color=True,
|
||||
|
||||
+3
-3
@@ -85,11 +85,11 @@ def _version_to_version(vstr):
|
||||
stage = 'r'
|
||||
release = 0
|
||||
|
||||
m = re.match(r"([0-9.]+)([dabfr])(\d+)?$", vstr)
|
||||
m = re.match(r"([0-9.]+)([dabfr])?(\d+)?$", vstr)
|
||||
if not m: raise ValueError("Bad version string: {}".format(vstr))
|
||||
|
||||
stage = m[2]
|
||||
release = int(m[3], 10)
|
||||
if m[2]: stage = m[2]
|
||||
if m[3]: release = int(m[3], 10)
|
||||
|
||||
vv = m[1].split('.')
|
||||
if len(vv) < 1 or len(vv) > 3 or not all(vv):
|
||||
|
||||
Reference in new issue
Block a user