You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The serialize variable in the config is not falling to the lowest acceptable pattern.
Reproduce:
My config is below:
[bumpversion]
current_version = 0.0.0b2
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}{release}{build}
{major}.{minor}.{patch}
commit = True
tag = False
[bumpversion:part:release]
optional_value = g
values =
a
b
g
[bumpversion:part:build]
[bumpversion:file:core/__init__.py]
[bumpversion:file:.version]
[bumpversion:file:pyproject.toml]
When I run:
bumpversion release --dry-run
I expect 0.0.0b2 to fall through the first serialization to the second and give me => 0.0.0 since release g is marked optional and the 0 should be marked optional by default for build.
Instead I get 0.0.0b2 => 0.0.0g0
When I flip the serialize order on this particular bump it actually works. However the next bump of release fails since it does not drop to the serialize pattern below it (this in particular was expected. I was trying to debug where the issue is). So this indicates to me that the issue is not with the default optional value of 0 on build.
Unfortunately, when I ran this without --dry-run, the serialization was set to 0.0.0 in the bumpversion config, but not in any of the additional files set in the config. So I got a mismatch of 0.0.0 in the config, and then 0.0.0g0 in the other files.
I think there are potentially two separate issues here. Happy to separate them if that's easier:
--serialize settings don't propagate to the files in the bump config. Looks like an issue for this already exists.
the serialize variable in the config is not falling to the lowest setting.
The text was updated successfully, but these errors were encountered:
Hi,
I'm currently on
bump2version = "^1.0.1"
Description
The
serialize
variable in the config is not falling to the lowest acceptable pattern.Reproduce:
My config is below:
When I run:
I expect 0.0.0b2 to fall through the first serialization to the second and give me => 0.0.0 since release
g
is marked optional and the 0 should be marked optional by default forbuild
.Instead I get 0.0.0b2 => 0.0.0g0
When I flip the serialize order on this particular bump it actually works. However the next bump of release fails since it does not drop to the serialize pattern below it (this in particular was expected. I was trying to debug where the issue is). So this indicates to me that the issue is not with the default optional value of 0 on build.
However, when I run:
I get what I want.
Unfortunately, when I ran this without --dry-run, the serialization was set to 0.0.0 in the bumpversion config, but not in any of the additional files set in the config. So I got a mismatch of 0.0.0 in the config, and then 0.0.0g0 in the other files.
I think there are potentially two separate issues here. Happy to separate them if that's easier:
serialize
variable in the config is not falling to the lowest setting.The text was updated successfully, but these errors were encountered: