Skip to content

A reliable way to determine whether a new version should be released #157

@AlesKrajnik

Description

@AlesKrajnik

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**&emsp;<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!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions