Closed ma-sadeghi closed 2 years ago
Just figured it out, posting the solution just in case: the problem is .*
in (?P<release>.*)
, which matches anything including digits, but I only wanted it to match dev
. So, I replaced it with \D+
which only matches characters, and it just works.
[bumpversion]
current_version = 2.8.2.dev20
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.(?P<release>\D+)(?P<build>\d+)
serialize = {major}.{minor}.{patch}.{release}{build}
[bumpversion:part:release]
values = dev
Here's my
setup.cfg
:When the version number is
2.8.2.dev19
,bump2version build
bumps it to2.8.2.dev110
instead of2.8.2.dev20
. It's very likely that mysetup.cfg
is buggy, would greatly appreciate it if you could take a look at it.