axion-release-plugin
axion-release-plugin copied to clipboard
Where does currentVersion come from ?
version=0.0.1-SNAPSHOT in gradle.properties is ignored
currentVersion returns 0.1.0-SNAPSHOT, but I have no idea where that's coming from.
There is no such tag on the repo.
''' $ git tag 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 '''
How can I configure it to use either the value in gradle.properties, or from build.gradle (and have it automatically increased when released) ?
Thank you.
hi, it's starting (first) version because no tag prefixed with "v" is found. Axion is based on git tags only ;)
@bgalek Thanks for the answer. Is there a way to explicitly define the version ? Like in gradle.properties ?
I would expect the plugin to automatically increase that version on release.
@Calin-Cosma You need to decide how do you want your workflow to work ;)
If you're use this plugin you will need to stick with git tags, you can reference them in your build.gradle file with project.version = scmVersion.version
. Plugin will increase this version on realise (and add a git tag to remember what version was the last one) see https://axion-release-plugin.readthedocs.io/en/latest/configuration/basic_usage/#single-module-project
@bgalek I did notice a weird issue after upgrading to newer version of the plugin that feels like a bug. In my project - we do have existing tags/releases that have a different prefix than v
- instead they are prefixed with release-
. Plugin allows to configure this by setting
scmVersion.tag.prefix="release-"
This works fine for the release
task - the version is increased properly and proper tag is pushed to the repo. But the currentVersion
task does not seem to respect that and it returns completely different/unrelated version (the 0.1.0 one to be exact - aka the default one when nothing can be detected I assume?)
Hi! Could you setup a GitHub repo as a proof of bug? You know simplest example - just to be sure that is not configuration related? After confirming a bug it should be easy to fix it and write a regression test :)