Skip to content

Commit

Permalink
Bump version of self and fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
serpro69 committed Apr 28, 2024
1 parent 5799723 commit 330be67
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
45 changes: 29 additions & 16 deletions semantic-versioning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
}
},
Expand Down Expand Up @@ -194,15 +197,25 @@ settings.extensions.configure<SemverPluginExtension>("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

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 330be67

Please sign in to comment.