Skip to content

Commit

Permalink
meta: fix tag check, clarify use of prerel numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
jplloyd committed Apr 5, 2020
1 parent 580ca45 commit e621ab3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/meta.py
Expand Up @@ -113,14 +113,18 @@
for part in (MAJOR, MINOR, PATCH, PREREL_NUM):
assert isinstance(part, int) and part >= 0
assert PREREL in {'', '-alpha', '-beta'}
if PREREL == '-alpha':
assert PREREL_NUM == 0

#: Base version string.
#: This is required to match a tag in git for formal releases. However
#: for pre-release (hyphenated) base versions, the formal version will
#: be further decorated with the number of commits following the tag.
MYPAINT_VERSION = '{major}.{minor}.{patch}{prerel}'.format(
major=MAJOR, minor=MINOR, patch=PATCH,
prerel=PREREL and PREREL+'.'+str(PREREL_NUM)
prerel=PREREL and
# Prerelease numbers should only be used for beta releases
PREREL + ('.' + str(PREREL_NUM) if PREREL == '-beta' else '')
)


Expand Down

0 comments on commit e621ab3

Please sign in to comment.