gradle-release icon indicating copy to clipboard operation
gradle-release copied to clipboard

Allow property for release type

Open cdschneider opened this issue 9 years ago • 2 comments

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:

  1. Skip the prompt for confirming the release version
  2. Change version to the correct next non-SNAPSHOT version for tag/release. ie if development version is 1.0.1-SNAPSHOT and I want to cut a major release, the tag would actually get bumped prior to release to 2.0.0. If I wanted a minor release, the tag would get bumped to 1.1.0.

cdschneider avatar May 17 '16 14:05 cdschneider

This is a great feature

mageddo avatar Jul 18 '17 03:07 mageddo

All the AI tools suggest using this flag, but it's not working.

kozla13 avatar Apr 17 '25 10:04 kozla13