From 330be6758843fef0ca7249c1076b60b093deabf9 Mon Sep 17 00:00:00 2001 From: Serhii Prodan <22973227+serpro69@users.noreply.github.com> Date: Sun, 28 Apr 2024 19:46:41 +0200 Subject: [PATCH] Bump version of self and fix docs --- semantic-versioning/README.md | 45 ++++++++++++++++++++++------------- settings.gradle.kts | 2 +- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/semantic-versioning/README.md b/semantic-versioning/README.md index 22632a0..a1054f1 100644 --- a/semantic-versioning/README.md +++ b/semantic-versioning/README.md @@ -84,10 +84,12 @@ If a commit with the "skip" keyword is found between `HEAD` and the latest versi #### Releasing via gradle properties -Instead of having the plugin look up keywords in commits, one can use `-Pincrement` property instead with the `:tag` task. -See [Gradle Properties](#gradle-properties) for more details on available values. +Instead of having the plugin look up keywords in commits, one can trigger the release with `-Prelease` property and set the next increment via `-Pincrement` instead. -As mentioned above, using the gradle property takes precedence over commit-based release via keywords. +See [Gradle Properties](#gradle-properties) for more details on available `increment` values and properties usage information. + +> [!NOTE] +> As mentioned above, releasing via gradle property (i.e. adding `-Prelease` to the gradle command) takes precedence over commit-based releases via keywords. ## Configuration @@ -109,10 +111,11 @@ The full config file looks like this: "useBranches": "false" }, "message": { - "major": "major", - "minor": "minor", - "patch": "patch", - "preRelease": "pre release", + "major": "[major]", + "minor": "[minor]", + "patch": "[patch]", + "preRelease": "[pre release]", + "skip": "[skip]", "ignoreCase": "true" } }, @@ -194,15 +197,25 @@ settings.extensions.configure("semantic-versioning") { The plugin makes use of the following properties: -- `promoteRelease` - boolean type property, promotes current pre-release to a release version -- `preRelease` - boolean type property, creates a new pre-release version from the current release -- `increment` - string type property, sets increment for the next version - - setting increment via gradle property take precedence over commit-based increments which can be configured via json and plugin-extension configurations - - accepted values are (case-insensitive): - - `major` - - `minor` - - `patch` - - `pre_release` +| name | type | description | +|------------------|---------|------------------------------------------------------------| +| `release` | boolean | creates a new release via gradle properties | +| `preRelease` | boolean | creates a new pre-release version from the current release | +| `promoteRelease` | boolean | promotes current pre-release to a release version | +| `increment` | string | sets increment for the next version | + +> [!INFO] +> Setting increment via gradle property (when using `-Prelease` property) takes precedence over commit-based keyword increments that are be configured via json and plugin-extension configurations. + +> [!IMPORTANT] +> Using "secondary properties" (`preRelease`, `promoteRelease`, `increment`) requires setting `release` property, otherwise the properties will have no effect. + +Accepted values for the `increment` property are (case-insensitive): + +- `major` +- `minor` +- `patch` +- `pre_release` ### Monorepo Support diff --git a/settings.gradle.kts b/settings.gradle.kts index cc0e884..72749ea 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,7 +9,7 @@ pluginManagement { } plugins { - id("io.github.serpro69.semantic-versioning") version "0.13.0" + id("io.github.serpro69.semantic-versioning") version "0.14.0" } rootProject.name = "semver.kt"