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:
## **0.1.2** <sub><sup>2024-07-27 (8695ecb12ef16977c92db2e3090aab77518b5300...eccee0fe03bc3806e978283e9582cb02d55decf8)</sup></sub>
*no relevant changes*
<br>
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:
- creating a new command to detect whether "no relevant changes" were made
- adding a flag telling the
version command to exit with an error in case there were no relevant changes
WDYT?
Thank you!
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 versionwill 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:
versioncommand to exit with an error in case there were no relevant changesWDYT?
Thank you!