commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

`cz bump` with a breaking change after an RC does not automatically increase the major version

Open Alexander-Serov opened this issue 2 years ago • 3 comments

Description

Trying to bump in the following repo structure:

  • cz bump new
  • realize we instead want a major version release, make some commits with a breaking change
  • tag v0.5.1rc0
  • some commits
  • tag v0.5.0
> cz bump --dry-run
bump: version 0.5.1rc0 → 0.5.1
tag to create: v0.5.1
increment detected: MAJOR

cz bump correctly detects that there is a major version increase but doesn't actually do it. This looks like a bug.

Steps to reproduce

  1. Try to cz bump with a breaking change on top of the last bugfix rc tag

Current behavior

Says it's a major increment, but just releases the rc: v0.5.1rc0 -> v0.5.1

Desired behavior

Release the next major version: v0.5.1rc0 -> v1.0.0

Screenshots

No response

Environment

Commitizen Version: 3.2.2
Python Version: 3.8.16 | packaged by conda-forge | (default, Feb  1 2023, 16:01:13) 
[Clang 14.0.6 ]
Operating System: Darwin

CZ configuration:

$ cat ./.cz.toml
[tool]
[tool.commitizen]
annotated_tag = true
changelog_incremental = true
changelog_merge_prerelease = true
name = "cz_conventional_commits"
tag_format = "v$version"
update_changelog_on_bump = true
version_provider = "scm"
version_type = "pep440"

Alexander-Serov avatar Jun 06 '23 10:06 Alexander-Serov

Can you share your toml configuration?

woile avatar Jun 06 '23 10:06 woile

Can you share your toml configuration?

Updated above.

Alexander-Serov avatar Jun 06 '23 11:06 Alexander-Serov

I think it relates to #688 what do you think?

woile avatar Jun 06 '23 11:06 woile

I just tested it without encountering the same issue with the latest version (3.26.0). Note that we'll need to set major_version_zero = false. I'm closing this one. But feel free to reopen if you deem otherwise 🙂

Lee-W avatar May 20 '24 21:05 Lee-W