Parametrize version based on last tags and commits
On testing last fix on version 1.32 I noticed that jar version in test build was 1.31.2-SNAPSHOT but it should be at lesat 1.32.
I'm wondering if parametrizing version based on last tag from the commit would be helpful in this case. Idea below
In pom.xml
<version>${version}-SNAPSHOT</version>
And then in CI:
- VERSION=$(git describe --always --tags --abbrev=0)
- mvn clean install "-Dversion=$VERSION" ...
Or after release automatically update version in pom.xml
from CI to the tag version.
Edited by Michael