-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect version comparison when updating from vcs tag #174
Comments
Good catch. You can have a look at the function So you might be able to change that line: - if latest_version_tag <= cfg.current_version:
+ if version.parse_version(latest_version_tag) <= version.parse_version(cfg.current_version): |
Uploaded to pypi 2022.1116 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The version check in
_update_cfg_from_vcs()
just does a regular string comparison, which does not work when the version numbers are not zero-padded:bumpver/src/bumpver/cli.py
Line 668 in 328ef5c
E.g., I use the version pattern YYYY.MM.INC0[-TAG] and have multiple local alpha versions which I don't commit to the vcs, but just use to publish dev versions to test.pypi.org. However, this workflow failed today, because the tools thinks that the version from my git tag
2022.3.2
is newer than my local alpha version2022.3.10a0
.Because
"2022.3.9a0" <= "2022.3.2"
isFalse
, the previous build succeeded and"2022.3.10a0" <= "2022.3.2"
isTrue
, it does not allow me to bump my version any further than that and sets the version back to 2022.3.3-alpha, which causes pypi to fail because this version already exists.I would really appreciate any help and would also try to fix this if you point me into the right direction.
The text was updated successfully, but these errors were encountered: