Allow property for release type
release.useAutomaticVersion is nice for Jenkins/CI builds where the tagged version will be the version minus the -SNAPSHOT but when people want to cut major, minor, bug-fix releases (among other release types based on other versioning strategies), they need to specify the release.releaseVersion property to whatever version they want every time they cut a release.
It'd be nice if we could automate the setting of the releaseVersion property based on the release "type" that a user wants.
So along with using the release.useAutomaticVersion flag, we could make an optional second and/or complementary flag that looks something like:
$ ./gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseType=<bug|minor|major>
This would:
- Skip the prompt for confirming the release version
-
Change version to the correct next non-SNAPSHOT version for tag/release. ie if development version is
1.0.1-SNAPSHOTand I want to cut amajorrelease, the tag would actually get bumped prior to release to2.0.0. If I wanted aminorrelease, the tag would get bumped to1.1.0.
This is a great feature
All the AI tools suggest using this flag, but it's not working.