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

[Question] How next-major works #2640

Closed
oliveirarafa opened this issue Dec 21, 2022 · 3 comments
Closed

[Question] How next-major works #2640

oliveirarafa opened this issue Dec 21, 2022 · 3 comments

Comments

@oliveirarafa
Copy link

Well, when I use semantic-release on next-major branches it creates a new major version for my lib. Like v2.0.0, v3.0.0.

Anyone knows why the default behavior it this? For my use case it is desirable to make it possible so the users can install my next-major versions.

I managed to make my next-major branch create versions like v2.0.0-next-major.1 (etc) using the prerelease setting but I need include a breaking change right at the first release or else I get a v1.4.5-next-major.

Without using this everytime I run my pipeline with semantic-release and a new breaking commit the version gets bumped to 3, 4, 5...

@r4j4h
Copy link

r4j4h commented Dec 22, 2022

There is a pull request that might affect logic that is affecting this behavior more towards what you are expecting, although I am not convinced it will fix your exact issue unfortunately. #2416

@oliveirarafa
Copy link
Author

Ok. Thank you!

@Tlepel
Copy link
Contributor

Tlepel commented Dec 28, 2022

If I understand the issue correctly, I think you can tweak this behaviour using the @semantic-release/commit-analyzer plugin: https://github.com/semantic-release/commit-analyzer

Here you could add a type 'major-fix' or 'major-release' with 'release': 'major', or perhaps it's better to use a scope major-release to each commit that triggers a new release. Let me know if that solves your problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants