Closed rivancic closed 1 month ago
Hello 👋
I think you are looking for this:
Both properties are used by the plugin; one is used to indicate which tag you are referencing in order to upgrade the version, and the one you mention that is used to indicate which is the tag associated to the project.
Thanks for the prompt response 💯
What is then the concrete difference between the two. Its confusing. Until now I was used to use only one prefix per project. And with it it doesn't make sense to use different prefix tag to upgrade version if we have specific one set for the project
say for project we set
semver.project.tagPrefix=v
in what case would it make sense to explicitly set
semver.tagPrefix=x
Or expressing it in another way
if semver.project.tagPrefix=v
is set then the semver.tagPrefix
should default to the value of semver.project.tagPrefix
by default.
Imagine the next scenario:
project-a
associated to the tag prefix v
(with the Gradle DSL or with the semver.project.tagPrefix
project-b
associated with the tag prefix w
project-c
associated with no prefix (empty string)All projects are on the version 1.0.0.
The semver.tagPrefix
is usted to indicate which tag prefix will be upgraded:
./gradlew printSemver -P semver.tagPrefix=w -P semver.scope=patch`
All project will show the version 1.0.0
except the project-b
which is using the tag prefix w
, so it will show the version 1.0.1
.
Advanced configuration options. Luckily for me all modules have same prefix and version for now. Still have to do some tweaking of the Jenkins pipeline will let you know if everything works as expected at the end. BTW switched to this plugin after I couldn't figure our how to properly setup https://github.com/jgitver/gradle-jgitver-plugin to my needs. And your plugin is up to date And you respond super fast.
You can set both properties to use the v
prefix in the root gradle.properties
so you can forget about anything related to the prefix.
I was trying to set tag prefix property as following inside of the gradle.properties file:
As its documented in README.md file https://github.com/JavierSegoviaCordoba/semver-gradle-plugin/tree/main?tab=readme-ov-file#usage
While this doesn't work.
Then I found (forgot where) the reference to
semver.project.tagPrefix
which actually does set the expected configuration. So documentation in README should be updated to reflect the correct properties that should be set.