jmongard / Git.SemVersioning.Gradle

Gradle plugin for automatically versioning a project using semantic versioning and conventional commits with change log support based on git commit messages.
https://plugins.gradle.org/plugin/com.github.jmongard.git-semver-plugin
Apache License 2.0
38 stars 4 forks source link

Ignore auto-version bumping on some commits #5

Closed szhem closed 3 years ago

szhem commented 3 years ago

Hello,

Is it possible to configure the plugin somehow to ignore version bumping on some commit message patterns? According to image it can be useful to prevent auto-bumping on certain commit types, like the following

docs(scope): improving readme.md
style(scope): reformatting the code
jmongard commented 3 years ago

It is currently not possible to prevent auto bumping the version. The plug-in assumes you are working on the next release after tagging a commit with a version number and that the next release will contain new fixes or features. Auto bumping is made so you don't accidentally add changes to already released code without changing the version number.

Changing this behavior with a new option should be an easy fix but I won't be able to implement it for a few weeks.

jmongard commented 3 years ago

Hi,

I added an option in version 0.4.0 of the plugin to prevent automatic increment of the version for non fix, feat, and breaking changes commits.

semver {
    noAutoBumb = true
}

I hope this will help.

szhem commented 3 years ago

@jmongard Thanks a lot for the changes! It's what I needed.