Skip to content

Commit

Permalink
Only add maturity/suffix if groups matched
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Jan 10, 2024
1 parent 6444ae8 commit 795ee12
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions photon-lib/py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
# which should be PEP440 compliant
if m:
versionString = m.group(0)
prefix = m.group(1)
maturity = m.group(2)
suffix = m.group(3).replace(".", "")
versionString = f"{prefix}.{maturity}.{suffix}"
print(len(m.group(2)))
# Hack -- for strings like v2024.1.1, do NOT add matruity/suffix
if len(m.group(2)) >= 0:
print("using beta group matcher")
prefix = m.group(1)
maturity = m.group(2)
suffix = m.group(3).replace(".", "")
versionString = f"{prefix}.{maturity}.{suffix}"


else:
Expand Down

0 comments on commit 795ee12

Please sign in to comment.