Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to override nextIncrementalVersion #167

Open
billbos-sgd opened this issue Feb 14, 2023 · 0 comments
Open

Option to override nextIncrementalVersion #167

billbos-sgd opened this issue Feb 14, 2023 · 0 comments

Comments

@billbos-sgd
Copy link

Hi Team,

My understanding is that by default, the parse-versions goal, will generate the nextIncrementalVersion by taking the current incremental version number and adding 1.

So, for example, if the current version in the pom is 2.3.1, then the next version would be 2.3.2.

In our Jenkins pipelines, we use something like this:
sh "mvn -B -U build-helper:parse-version --batch-mode ${env.VERSIONS_PLUGIN_GOALS} -DnewVersion='\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}' versions: commit"

The problem with this approach is that if we want to release the next minor version (e.g. 2.4.x), it is not possible to release 2.4.0.
Because if the version in the pom is 2.4.0, then the above will generate 2.4.1.

Is it possible to override the default behavior and don't change the version?
That is, a version 2.4.0 in the pom.xml, should remain 2.4.0

Thanks you in advance,
Bill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant