Skip to content

Commit 8c82422

Browse files
authored
docs(README): Updated documentation
Updated README to reflect changes in versioning settings and examples.
1 parent b9dca8d commit 8c82422

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -98,32 +98,6 @@ This can be useful for projects that follow a simpler versioning scheme.
9898

9999
To enable 2-digit versioning, set `useTwoDigitVersion = true` in your configuration:
100100

101-
```groovy
102-
semver {
103-
useTwoDigitVersion = true
104-
}
105-
```
106-
107-
#### How 2-Digit Versioning Works
108-
109-
When `useTwoDigitVersion` is enabled:
110-
111-
* **Version Format**: Versions are formatted as `major.minor` (e.g., `5.2` instead of `5.2.0`)
112-
* **Patch Changes**: Fix commits (`fix:`) are treated as minor version changes instead of patch changes
113-
* **Version Bumping**: When no specific version changes are triggered, the minor version is incremented instead of the patch version
114-
* **Pre-releases**: Pre-release versions work the same way (e.g., `5.2-alpha.1`)
115-
116-
#### Example with 2-Digit Versioning
117-
118-
| Command | Commit Text | Calculated version |
119-
| --------------------------------------------- | ------------------------- | ------------------- |
120-
| git commit -m "Initial commit" | Initial commit | 0.1-SNAPSHOT+001 |
121-
| git commit -m "fix: a bug fix" | fix: a bug fix | 0.2-SNAPSHOT+001 |
122-
| gradle releaseVersion | release: v0.2 | 0.2 |
123-
| git commit -m "feat: new feature" | feat: new feature | 0.3-SNAPSHOT+001 |
124-
| git commit -m "feat!: breaking change" | feat!: breaking change | 1.0-SNAPSHOT+002 |
125-
| gradle releaseVersion --preRelease="alpha.1" | release: v1.0-alpha.1 | 1.0-alpha.1 |
126-
127101
#### Accessing 2-Digit Versions
128102

129103
When `useTwoDigitVersion` is enabled, the standard version properties automatically use the 2-digit format:
@@ -204,7 +178,8 @@ The `releaseVersion` task creates both a release commit and a release tag by def
204178
**Note:** The `releaseVersion` task is currently only registered on the root project when the plugin is applied there.
205179

206180
## Example of how version is calculated
207-
With setting: `groupVersionIncrements = true` (default)
181+
182+
### With setting: `groupVersionIncrements = true` (default)
208183

209184
| Command | Commit Text | Calculated version |
210185
| --------------------------------------------- | ------------------------- | ------------------- |
@@ -236,7 +211,7 @@ With setting: `groupVersionIncrements = true` (default)
236211
| git commit -m "feat!: breaking feature" | feat!: breaking feature | 2.0.0-alpha.1+002 |
237212
| gradle releaseVersion --preRelease="-" | release: v2.0.0 | 2.0.0 |
238213

239-
With setting: `groupVersionIncrements = false`
214+
### With setting: `groupVersionIncrements = false`
240215

241216
| Command | Commit Text | Calculated version |
242217
| --------------------------------------------- | ------------------------- | ------------------- |
@@ -268,7 +243,6 @@ With setting: `groupVersionIncrements = false`
268243
| git commit -m "feat!: breaking feature" | feat!: breaking feature | 2.0.0-alpha.1+002 |
269244
| gradle releaseVersion --preRelease="-" | release: v2.0.0 | 2.0.0 |
270245

271-
272246
## Configuration
273247

274248
The plugin can be configured using the `semver` extension. This needs to be done before retrieving the version:
@@ -327,7 +301,7 @@ with IGNORE_CASE and MULTILINE options enabled.
327301

328302
## Supported Gradle version
329303

330-
This plugin has been tested on Gradle 7.x and 8.x. (Version 0.4.3 and older should work on gradle 6.x and probably 5.x)
304+
This plugin has been tested on Gradle 8.x and 9.x. (Version 0.4.3 and older should work on gradle 6.x and probably 5.x)
331305

332306
## Continuous Integration
333307
The plugin calculates the version using the commit tree. Make sure you check out all commits relevant and not just

0 commit comments

Comments
 (0)