Open
Description
Description
Hi,
I've doubt on how check-consistency
flag works.
Steps to reproduce
- have a project managed with poetry, with a pyproject.toml like the following
[tool.poetry]
name = "cool_proj"
version = "2.5.7" <<<< this is mandatory for poetry to make the package
...
[tool.commitizen]
name = "cz_conventional_commits"
version = "2.5.2" <<<< this is mandatory for commitizen
version_files = [
"cool_proj/__init__.py:__version__",
"pyproject.toml:version"
]
and __init__.py
contains
__version__ = "2.5.2"
- run
poetry run cz bump --check-consistency
Current behavior
the command works, it prints on stdout
Bump version: 2.5.2 -> 2.5.3 <<< it takes the value from commitizen's toml section
tag to create: 2.5.3
Desired behavior
the expected could be a warning about version not consistent, because at least content of __init__.py
differ from the expected (the one into commitizen's toml section).
looking at implementation, also the regex usage has major drawback in this kind of setup, because the regex surely find commitizen's "version" attribute, but it can miss the poetry's one, creating package with wrong number (it's taken from poetry section).
Screenshots
No response
Environment
- commitizen 2.34.0
- python 3.9.13
- windows 11