-
Notifications
You must be signed in to change notification settings - Fork 42
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
A reliable way to determine whether a new version should be released #157
Comments
Hi, I would go for
|
and add same flag for changelog command |
I just came up with another idea.
WDYT? |
As I see it, it's two questions:
For the first question, I think it depends on what "no relevant changes" means, or specifically, whether "no relevant" changes" implies the version should not be bumped. If that would be the case, that would mean that if there are no commits with type defined in The current behaviour is, however, that the version if always bumped, even when the type is not in
So perhaps this should be clarified first - what constitutes no version bump? The official documentation does not really answer that question. It mentions that new version should be bumped for "feat" and "fix" types and all BREAKING CHANGES, however, it does not suggest anything e.g. for Perhaps we need a new configuration for it? Or can For the second question, I would say, it's really a binary question - the version should be either bumped or not. In this case, a simple CLI parameter would IMO do the trick. |
Hi,
I am looking for a reliable way how to detect whether a new version should be published based on the commits. E.g. if I only ammend the documentation and then issue
npx git-conventional-commits changelog
, it produces something like this:Similarly,
npx git-conventional-commits version
will produce a new version number even when there were no relevant changes.I can of course do something like
npx git-conventional-commits changelog | grep "\*no relevant changes\*"
, but that does not seem to be a sustainable solution.Would it be possible to have the tool indicate that no new version is needed?
I can think of two different ways:
version
command to exit with an error in case there were no relevant changesWDYT?
Thank you!
The text was updated successfully, but these errors were encountered: