JavierSegoviaCordoba / semver-gradle-plugin

Set projects versions based on git tags and following semantic versioning
https://semver-gradle-plugin.javiersc.com
Other
25 stars 3 forks source link

createSemverTag prints version #160

Closed rivancic closed 1 month ago

rivancic commented 2 months ago

Running createSemverTask doesn't create any tag it prints following. image

just running print task.

What am I doing wrong? I expect to create new tag.

JavierSegoviaCordoba commented 2 months ago

Hello 👋

You need to provide the tag you want to upgrade the version.

As your project is using the tag v

./gradlew cST -P semver.tagPrefix=v
rivancic commented 1 month ago

It's working!

Again, if I set it already to project (semver.project.tagPrefix) I think this should be the default tag then later for any new version tag creation. Except if one would like to assign for specific reason different tag than project default then I would expect semver.tagPrefix to be set.

JavierSegoviaCordoba commented 1 month ago

The default tag prefix is an empty string, so if you don't want to specify anything I recommend you to remove the prefix.

The prefix is only necessary for multi module projects with different versions so you can upgrade one project without upgrading the other.

rivancic commented 1 month ago

Thanks for clarifying that up. Will have to use the prefix as its used in my project as a convention.

JavierSegoviaCordoba commented 1 month ago

You can add both properties to the root gradle.properties and forget about them 😄