Skip to content

Commit

Permalink
fix version matching. final is assumed and a missing release no longe…
Browse files Browse the repository at this point in the history
…r errors
  • Loading branch information
ksherlock committed Jan 13, 2024
1 parent 6a8455a commit f63135c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions examples/icon.prez
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
#
#

rIcon(
color=True,
Expand Down
6 changes: 3 additions & 3 deletions prez/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f63135c

Please sign in to comment.