inc BUILD by +1000 if < 1000

This commit is contained in:
Manuel Barkhau 2020-09-17 23:46:30 +00:00
parent 5940fdbc40
commit f11c8c89f8
2 changed files with 7 additions and 1 deletions

View file

@ -486,7 +486,12 @@ def incr(
else:
logger.warning(f"Version appears to be from the future '{old_version}'")
cur_vinfo = cur_vinfo._replace(bid=lexid.incr(cur_vinfo.bid))
_bid = cur_vinfo.bid
if int(_bid) < 1000:
# prevent truncation of leading zeros
_bid = str(int(_bid) + 1000)
cur_vinfo = cur_vinfo._replace(bid=lexid.incr(_bid))
if major:
cur_vinfo = cur_vinfo._replace(major=cur_vinfo.major + 1, minor=0, patch=0)