mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-13 06:50:08 +01:00
inc BUILD by +1000 if < 1000
This commit is contained in:
parent
5940fdbc40
commit
f11c8c89f8
2 changed files with 7 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue