@@ -37,7 +37,19 @@ created. Modify this to suit your needs.
37
37
38
38
## Global configuration
39
39
40
- The global configuration looks like this:
40
+ Following supported workflow configurations are available in GitVersion and can be referenced by the workflow property:
41
+ - GitFlow (GitFlow/v1)
42
+ - GitHubFlow (GitHubFlow/v1) and
43
+ - TrunkBased (TrunkBased/v1)
44
+
45
+ Example of using a TrunkBased workflow with a different tag-prefix:
46
+
47
+ ``` yaml
48
+ workflow : TrunkBased/v1
49
+ tag-prefix : ' [abc]'
50
+ ` ` `
51
+
52
+ The build-in configuration for the ` GitFlow` workflow (`workflow: GitFlow/v1`) looks like:
41
53
42
54
` ` ` yaml
43
55
assembly-versioning-scheme: MajorMinorPatch
@@ -61,10 +73,10 @@ strategies:
61
73
- VersionInBranchName
62
74
branches:
63
75
develop:
64
- take-incremented-version : TakeAlwaysIncrementedVersion
65
76
label: alpha
66
77
increment: Minor
67
78
prevent-increment-of-merged-branch-version: false
79
+ prevent-increment-when-tagged: false
68
80
track-merge-target: true
69
81
regex: ^dev(elop)?(ment)?$
70
82
source-branches: []
@@ -89,10 +101,10 @@ branches:
89
101
pre-release-weight: 55000
90
102
release:
91
103
mode: ManualDeployment
92
- take-incremented-version : TakeAlwaysIncrementedVersion
93
104
label: beta
94
105
increment: None
95
106
prevent-increment-of-merged-branch-version: true
107
+ prevent-increment-when-tagged: false
96
108
track-merge-target: false
97
109
regex: ^releases?[/-]
98
110
source-branches:
@@ -138,6 +150,7 @@ branches:
138
150
mode: ManualDeployment
139
151
label: beta
140
152
increment: Inherit
153
+ prevent-increment-when-tagged: false
141
154
regex: ^hotfix(es)?[/-]
142
155
source-branches:
143
156
- release
@@ -177,10 +190,10 @@ branches:
177
190
ignore:
178
191
sha: []
179
192
mode: ContinuousDelivery
180
- take-incremented-version : TakeTaggedOtherwiseIncrementedVersion
181
193
label: '{BranchName}'
182
194
increment: Inherit
183
195
prevent-increment-of-merged-branch-version: false
196
+ prevent-increment-when-tagged: true
184
197
track-merge-target: false
185
198
track-merge-message: true
186
199
commit-message-incrementing: Enabled
@@ -192,11 +205,195 @@ is-release-branch: false
192
205
is-main-branch: false
193
206
` ` `
194
207
208
+ The supported build-in configuration for the `GitHubFlow` workflow (`workflow : GitHubFlow/v1`) looks like:
209
+
210
+ ` ` ` yaml
211
+ assembly-versioning-scheme: MajorMinorPatch
212
+ assembly-file-versioning-scheme: MajorMinorPatch
213
+ tag-prefix: '[vV]?'
214
+ version-in-branch-pattern: (?<version>[vV]?\d +(\.\d +)?(\.\d +)?).*
215
+ major-version-bump-message: '\+ semver:\s ?(breaking|major)'
216
+ minor-version-bump-message: '\+ semver:\s ?(feature|minor)'
217
+ patch-version-bump-message: '\+ semver:\s ?(fix|patch)'
218
+ no-bump-message: '\+ semver:\s ?(none|skip)'
219
+ tag-pre-release-weight: 60000
220
+ commit-date-format: yyyy-MM-dd
221
+ merge-message-formats: {}
222
+ update-build-number: true
223
+ semantic-version-format: Strict
224
+ strategies:
225
+ - ConfiguredNextVersion
226
+ - MergeMessage
227
+ - TaggedCommit
228
+ - TrackReleaseBranches
229
+ - VersionInBranchName
230
+ branches:
231
+ main:
232
+ label: ''
233
+ increment: Patch
234
+ prevent-increment-of-merged-branch-version: true
235
+ track-merge-target: false
236
+ regex: ^master$|^main$
237
+ source-branches:
238
+ - release
239
+ is-source-branch-for: []
240
+ tracks-release-branches: false
241
+ is-release-branch: false
242
+ is-main-branch: true
243
+ pre-release-weight: 55000
244
+ release:
245
+ mode: ManualDeployment
246
+ label: beta
247
+ increment: None
248
+ prevent-increment-of-merged-branch-version: true
249
+ prevent-increment-when-tagged: false
250
+ track-merge-target: false
251
+ regex: ^releases?[/-]
252
+ source-branches:
253
+ - main
254
+ - release
255
+ is-source-branch-for: []
256
+ tracks-release-branches: false
257
+ is-release-branch: true
258
+ is-main-branch: false
259
+ pre-release-weight: 30000
260
+ feature:
261
+ mode: ManualDeployment
262
+ label: '{BranchName}'
263
+ increment: Inherit
264
+ regex: ^features?[/-](?<BranchName>.+)
265
+ source-branches:
266
+ - main
267
+ - release
268
+ - feature
269
+ is-source-branch-for: []
270
+ pre-release-weight: 30000
271
+ pull-request:
272
+ mode: ContinuousDelivery
273
+ label: PullRequest
274
+ increment: Inherit
275
+ label-number-pattern: '[/-](?<number>\d +)'
276
+ regex: ^(pull|pull\- requests|pr)[/-]
277
+ source-branches:
278
+ - main
279
+ - release
280
+ - feature
281
+ is-source-branch-for: []
282
+ pre-release-weight: 30000
283
+ unknown:
284
+ mode: ManualDeployment
285
+ label: '{BranchName}'
286
+ increment: Inherit
287
+ regex: (?<BranchName>.+)
288
+ source-branches:
289
+ - main
290
+ - release
291
+ - feature
292
+ - pull-request
293
+ is-source-branch-for: []
294
+ ignore:
295
+ sha: []
296
+ mode: ContinuousDelivery
297
+ label: '{BranchName}'
298
+ increment: Inherit
299
+ prevent-increment-of-merged-branch-version: false
300
+ prevent-increment-when-tagged: true
301
+ track-merge-target: false
302
+ track-merge-message: true
303
+ commit-message-incrementing: Enabled
304
+ regex: ''
305
+ source-branches: []
306
+ is-source-branch-for: []
307
+ tracks-release-branches: false
308
+ is-release-branch: false
309
+ is-main-branch: false
310
+ ` ` `
311
+
312
+ The supported build-in configuration for the `TrunkBased` workflow (`workflow : TrunkBased/v1`) looks like:
313
+
314
+ ` ` ` yaml
315
+ assembly-versioning-scheme: MajorMinorPatch
316
+ assembly-file-versioning-scheme: MajorMinorPatch
317
+ tag-prefix: '[vV]?'
318
+ version-in-branch-pattern: (?<version>[vV]?\d +(\.\d +)?(\.\d +)?).*
319
+ major-version-bump-message: '\+ semver:\s ?(breaking|major)'
320
+ minor-version-bump-message: '\+ semver:\s ?(feature|minor)'
321
+ patch-version-bump-message: '\+ semver:\s ?(fix|patch)'
322
+ no-bump-message: '\+ semver:\s ?(none|skip)'
323
+ tag-pre-release-weight: 60000
324
+ commit-date-format: yyyy-MM-dd
325
+ merge-message-formats: {}
326
+ update-build-number: true
327
+ semantic-version-format: Strict
328
+ strategies:
329
+ - TrunkBased
330
+ - ConfiguredNextVersion
331
+ branches:
332
+ main:
333
+ mode: ContinuousDeployment
334
+ label: ''
335
+ increment: Patch
336
+ prevent-increment-of-merged-branch-version: true
337
+ track-merge-target: false
338
+ regex: ^master$|^main$
339
+ source-branches: []
340
+ tracks-release-branches: false
341
+ is-release-branch: false
342
+ is-main-branch: true
343
+ pre-release-weight: 55000
344
+ feature:
345
+ increment: Minor
346
+ regex: ^features?[/-](?<BranchName>.+)
347
+ prevent-increment-when-tagged: false
348
+ source-branches:
349
+ - main
350
+ pre-release-weight: 30000
351
+ hotfix:
352
+ increment: Patch
353
+ regex: ^hotfix(es)?[/-](?<BranchName>.+)
354
+ prevent-increment-when-tagged: false
355
+ source-branches:
356
+ - main
357
+ pre-release-weight: 30000
358
+ pull-request:
359
+ mode: ManualDeployment
360
+ label: PullRequest
361
+ increment: Inherit
362
+ label-number-pattern: '[/-](?<number>\d +)'
363
+ regex: ^(pull|pull\- requests|pr)[/-]
364
+ source-branches:
365
+ - main
366
+ pre-release-weight: 30000
367
+ unknown:
368
+ mode: ManualDeployment
369
+ increment: Inherit
370
+ regex: (?<BranchName>.+)
371
+ source-branches:
372
+ - main
373
+ - release
374
+ - feature
375
+ - pull-request
376
+ ignore:
377
+ sha: []
378
+ mode: ManualDeployment
379
+ label: '{BranchName}'
380
+ increment: Inherit
381
+ prevent-increment-of-merged-branch-version: false
382
+ prevent-increment-when-tagged: true
383
+ track-merge-target: false
384
+ track-merge-message: true
385
+ commit-message-incrementing: Enabled
386
+ regex: ''
387
+ tracks-release-branches: false
388
+ is-release-branch: false
389
+ is-main-branch: false
390
+ ` ` `
391
+
195
392
The details of the available options are as follows :
196
393
197
394
# ## workflow
198
395
199
- The base template of the configuration to use. Possible values are: GitFlow/v1 or GitHubFlow/v1
396
+ The base template of the configuration to use. Possible values are : GitFlow/v1 or GitHubFlow/v1 or TrunkBased/v1. Defaults to GitFlow/v1 if not set.
200
397
201
398
# ## next-version
202
399
@@ -266,10 +463,6 @@ The default value is `{InformationalVersion}`.
266
463
Sets the `mode` of how GitVersion should create a new version. Read more at
267
464
[deployment modes][modes].
268
465
269
- # ## take-incremented-version
270
-
271
- This branch related property can be used to control the behavior weither to take the incremented or the tagged version.
272
-
273
466
# ## increment
274
467
275
468
The part of the SemVer to increment when GitVersion detects it needs to be
@@ -612,6 +805,10 @@ In a GitFlow-based repository, setting this option can have implications on the
612
805
better version source proposed by the `MergeMessageBaseVersionStrategy`. For
613
806
more details and an in-depth analysis, please see [the discussion][2506].
614
807
808
+ # ## prevent-increment-when-tagged
809
+
810
+ This branch related property can be used to control the behavior weither to take the incremented or the current tagged version.
811
+
615
812
# ## label-number-pattern
616
813
617
814
Pull requests require us to extract the pre-release number out of the branch
@@ -706,4 +903,4 @@ Specifies which version strategy implementation (one ore more) will be used to d
706
903
* TaggedCommit
707
904
* TrackReleaseBranches
708
905
* VersionInBranchName
709
- * TrunkBased
906
+ * TrunkBased
0 commit comments