Skip to content
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

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

Closed
Alexander-Serov opened this issue Jun 6, 2023 · 4 comments

Comments

@Alexander-Serov
Copy link

Alexander-Serov commented Jun 6, 2023

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"
@woile
Copy link
Member

woile commented Jun 6, 2023

Can you share your toml configuration?

@Alexander-Serov
Copy link
Author

Can you share your toml configuration?

Updated above.

@woile
Copy link
Member

woile commented Jun 6, 2023

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

@Lee-W
Copy link
Member

Lee-W commented May 20, 2024

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 Lee-W closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants