axion-release-plugin icon indicating copy to clipboard operation
axion-release-plugin copied to clipboard

createReleaseCommit creates always 3 empty commits

Open flitzie opened this issue 5 years ago • 2 comments

Hello,

strangely when using "createReleaseCommit true" axion always creates 3 empty commits and only the last commit is tagged. I would have expected only one empty commit.

I'm using a multi-project in Gradle and have configured axion with: allprojects { project.version = scmVersion.version

Thank you for your reply. Best wishes

flitzie avatar Jul 30 '19 10:07 flitzie

Hmm do you have 3 modules in your project? Could it be that the task is called for each module, instead for root only? Did you configure your project as desired here: https://axion-release-plugin.readthedocs.io/en/latest/configuration/basic_usage/#multi-module-project ?

adamdubiel avatar Jul 30 '19 12:07 adamdubiel

Hi, yes I had 3 modules indeed and yes I followed exactly your documentation. But even using only one module I still got the same behaviour with Gradle 5.2.1 and Axion 1.10.0 and 1.10.2.

That's why I am using this workaround now:

hooks { pre 'fileUpdate', [file: 'gradle.properties', pattern: {v, c -> /^version=.*$/}, replacement: {v, c -> "version=$v"}] pre 'commit', {v, p -> "release version: ${v}${addMsg}"} } Best wishes

flitzie avatar Nov 04 '19 14:11 flitzie