@@ -255,8 +255,8 @@ it's set to `v/.+`):
255
255
256
256
### incrementPrerelease
257
257
258
- This rule uses additional parameter ` initialPreReleaseIfNotOnPrerelease ` (by default
259
- it's empty):
258
+ This rule uses additional parameter ` initialPreReleaseIfNotOnPrerelease `
259
+ (by default it's empty):
260
260
261
261
scmVersion {
262
262
versionIncrementer('incrementPrerelease', [initialPreReleaseIfNotOnPrerelease: 'rc1'])
@@ -265,15 +265,15 @@ it's empty):
265
265
## Decorating
266
266
267
267
Decorating phase happens only when version is read (and deserialized).
268
- During this phase version can be decorated with i.e. branch name.
269
- Default decorator does nothing. ` axion-release-plugin ` supports adding
270
- predefined named version creators (so don't be afraid to post pull
271
- request if you have something useful!). Decoration phase is conducted by
272
- * version creators * , you can configure it via ` scmVersion.versionCreator `
268
+ During this phase, the version will be decorated with a branch name (default behavior) .
269
+ ` axion-release-plugin ` supports adding predefined named version creators
270
+ (so don't be afraid to post pull request if you have something useful!).
271
+ Decoration phase is conducted by * version creators * ,
272
+ you can configure it via ` scmVersion.versionCreator `
273
273
method:
274
274
275
275
scmVersion {
276
- versionCreator('versionWithBranch ')
276
+ versionCreator('versionWithCommitHash ')
277
277
}
278
278
279
279
Or via ` release.versionCreator ` command line argument, which overrides
@@ -295,9 +295,23 @@ Per-branch version creators must be closures, there is no support for
295
295
predefined creators. First match wins, but the order depends on
296
296
collection type used (default for ` [:] ` is LinkedHashMap).
297
297
298
+ #### versionWithBranch [ default]
299
+
300
+ scmVersion {
301
+ versionCreator('versionWithBranch')
302
+ }
303
+
304
+ This version creator appends branch name to version unless you are on
305
+ * main* /* master* or * detached HEAD* :
306
+
307
+ decorate(version: '0.1.0', branch: 'master') == 0.1.0
308
+ decorate(version: '0.1.0', branch: 'my-special-branch') == 0.1.0-my-special-branch
309
+
310
+ This is the default version creator since version 1.18.0 of the plugin.
311
+
298
312
#### simple
299
313
300
- This is the default version creator that does nothing :
314
+ This version creator is no operation one :
301
315
302
316
decorate(version: '0.1.0') == 0.1.0
303
317
@@ -310,18 +324,6 @@ It might be useful when you want some branches to do *nothing*:
310
324
])
311
325
}
312
326
313
- #### versionWithBranch
314
-
315
- scmVersion {
316
- versionCreator('versionWithBranch')
317
- }
318
-
319
- This version creator appends branch name to version unless you are on
320
- * main* /* master* or * detached HEAD* :
321
-
322
- decorate(version: '0.1.0', branch: 'master') == 0.1.0
323
- decorate(version: '0.1.0', branch: 'my-special-branch') == 0.1.0-my-special-branch
324
-
325
327
#### versionWithCommitHash
326
328
327
329
scmVersion {
0 commit comments