-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update major for breaking changes in 0.x versions by default #57
Comments
Change default behavior for major version bumps. Now, major versions are always bumped for breaking changes. --major-version-zero flag restores previous behaviour Resolves: pawamoy#57 Issue pawamoy#57: pawamoy#57
Hello, thanks for the feature request. git-changelog's behavior is based on semver's spec:
So, with the current behavior, breaking changes trigger a major bump only if major version is greater than 0. It means you can iterate fast and break things without worrying about your major version suddenly being bumped to 1. Once you are ready to bump to 1, you do so explicitly (unreleased features will help, let me publish a new version). It happens only once, and then you can continue relying on git-changelog behavior, which will now bump the major version for breaking changes. IMO putting this automatic behavior, which is compliant with semver's spec, behind a flag, would deteriorate the user experience. Also, from the link you posted:
I don't think that's a good workflow, requiring users to voluntarily add a breaking change, or at least mark a commit as breaking even if it is not, just to bump to 1.0.0. Bumping to 1 from 0 does not necessarily mean there is a breaking change, it simply means your API is stable and ready for production. Therefore I'm inclined to say no to this feature! Happy to discuss this further 🙂 |
OK, version 2.3.0 published, you can now use |
However, these claims do not contradict my approach.
In Therefore, we simply allow users to choose their workflow. The proposed implementation is taken from commitizen, which also based on the semver's spec. I think you won't deny that. I could use commitizen for all my needs, but for changelogs, Perhaps we can add this feature, modifying it in a way that the default remains as you prefer, while we, the users, have the ability to override it in the same pyproject.toml? |
I completely agree. I didn't suggest such a workflow. You should only add the breaking change flag when it's truly necessary. With my approach, you don't need to add the flag 'forcefully'. You simply have a choice: you can switch to the new version using It all depends on the situation. For instance, I automatically update the version and Git tag using commitizen, and I have set major-version-zero = false. So, if I make a commit As a result, I'll get a 1.0.0 release where, in CHANGELOG.md, the bump worked incorrectly and set, for example, 0.1.0 instead of 1.0.0. |
OK so the actual use case is continuous deployment. We currently provide a way to bump manually when ready for v1, but no "automated" way from configuration only. Let me think about how I'd like to handle this :) |
Sure, maybe I should start with that. I always thinking about CI/CD :D |
Is your feature request related to a problem? Please describe.
I find it non-intuitive when we don't update the major version for breaking changes in 0.x versions. I use git-changelog and commitizen together. Right now, I have to use 'major-version-zero=true' because that's the only option in git-changelog."
Describe the solution you'd like
Add arg --major-version-zero like in commitizen: https://commitizen-tools.github.io/commitizen/bump/#-major-version-zero
By default, we can update the major version, and if we use that param, we will update minor.
The text was updated successfully, but these errors were encountered: