Skip to content

"cz bump" update all verions with the same version as the project version #1205

Closed
@aidin-zadeh

Description

@aidin-zadeh

Description

The cz bump command to increment the version of the python poetry package, would automatically updates all version strings in the pyproject.toml file. This includes the version numbers of all dependencies, which can be problematic if you have complex dependencies and you don't want their versions to be updated.

If you use inline-table or standard-table syntax to specify package dependencies in pyproject.toml, you have to set the expected version using the 'version' property. If you run 'cz bump', it will also update these versions, which may not be what you want.

Steps to reproduce

  1. poetry dependencies with complex specifications:
[tool.poetry.dependencies]
python = "^3.11.0"
my_dep = {version = "^1.0.0", source = "my-soruce"}

[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "pep440"
version_provider = "poetry"
update_changelog_on_bump = false
changelog_incremental = false
version_files = [
    "my_package/__init__.py",
    "pyproject.toml:version"
]
  1. cz bump

Current behavior

Incrementing the version of a Python package with complex dependencies using the 'version' property can inadvertently update the version of package dependencies, which may not be the intended outcome.

Desired behavior

cz bump should only bump the package version only. Or add support to temporarily disable bumping for a given code line/table/block.

Screenshots

No response

Environment

cz version: 3.28.0
Python: 3.11.8
OS: Darwin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions