Skip to content

_bump_with_regex function changes dependencies if they have same version number #1580

@be8312e4b036

Description

@be8312e4b036

https://github.com/commitizen-tools/commitizen/blob/75a97e56bddac011e0d0eca3018fc0f873edbe4c/commitizen/bump.py#L131C4-L142C5

In a pyproject.toml of the form:

[project]
name = "myproject"
version = "1.2.3"
dependencies = [
    "package-a==5.0.0",
    "package-b==1.2.3"
]

[tool.commitizen]
name = "cz_conventional_commits"
version_files = ["pyproject.toml"]
tag_format = "v$version"
version_scheme = "pep440"
version_provider = "pep621"

[tool.uv.sources]
mygitpackage = { git = "...", rev = "v1.2.3" }

the packages package-b and mygitpackage get bumped as well as myproject (when running cz bump) because the regex is just matching on the version number. These shouldn't be bumped and leads to errors when they are.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions