Skip to content

Commit a1c23c1

Browse files
committed
Docs changes
1 parent a3ed70a commit a1c23c1

File tree

1 file changed

+44
-21
lines changed

1 file changed

+44
-21
lines changed

docs/input/docs/reference/configuration.md

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ RedirectFrom: docs/configuration
88
GitVersion, starting from version 3.0, is mainly powered by configuration and no
99
longer has branching strategies hard-coded.
1010

11-
## Configuration tool
12-
13-
If you run `gitversion init`, GitVersion will launch into a configuration tool,
14-
which can help you configure GitVersion the way you want it.
15-
16-
Once complete, the `init` command will create a `GitVersion.yml` file in the
17-
working directory. It can be the root repository directory or any subdirectory
18-
in case you have a single repository for more than one project or are restricted
19-
to commit into a subdirectory.
20-
2111
:::{.alert .alert-info}
2212
**Note**
2313

@@ -48,7 +38,9 @@ tag-prefix: '[abc]'
4838
4939
The built-in configuration for the `GitFlow` workflow (`workflow: GitFlow/v1`) looks like:
5040

51-
```yaml
41+
<!-- snippet: /docs/workflows/GitFlow/v1.yml -->
42+
<a id='snippet-/docs/workflows/GitFlow/v1.yml'></a>
43+
```yml
5244
assembly-versioning-scheme: MajorMinorPatch
5345
assembly-file-versioning-scheme: MajorMinorPatch
5446
tag-prefix: '[vV]?'
@@ -217,10 +209,14 @@ tracks-release-branches: false
217209
is-release-branch: false
218210
is-main-branch: false
219211
```
212+
<sup><a href='/docs/workflows/GitFlow/v1.yml#L1-L167' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
213+
<!-- endSnippet -->
220214

221215
The supported built-in configuration for the `GitHubFlow` workflow (`workflow: GitHubFlow/v1`) looks like:
222216

223-
```yaml
217+
<!-- snippet: /docs/workflows/GitHubFlow/v1.yml -->
218+
<a id='snippet-/docs/workflows/GitHubFlow/v1.yml'></a>
219+
```yml
224220
assembly-versioning-scheme: MajorMinorPatch
225221
assembly-file-versioning-scheme: MajorMinorPatch
226222
tag-prefix: '[vV]?'
@@ -280,12 +276,12 @@ branches:
280276
increment: Inherit
281277
prevent-increment:
282278
when-current-commit-tagged: false
279+
track-merge-message: true
283280
regex: ^features?[/-](?<BranchName>.+)
284281
source-branches:
285282
- main
286283
- release
287284
is-source-branch-for: []
288-
track-merge-message: true
289285
is-main-branch: false
290286
pre-release-weight: 30000
291287
pull-request:
@@ -296,28 +292,28 @@ branches:
296292
of-merged-branch: true
297293
when-current-commit-tagged: false
298294
label-number-pattern: '[/-](?<number>\d+)'
295+
track-merge-message: true
299296
regex: ^(pull|pull\-requests|pr)[/-]
300297
source-branches:
301298
- main
302299
- release
303300
- feature
304301
is-source-branch-for: []
305-
track-merge-message: true
306302
pre-release-weight: 30000
307303
unknown:
308304
mode: ManualDeployment
309305
label: '{BranchName}'
310306
increment: Inherit
311307
prevent-increment:
312308
when-current-commit-tagged: false
309+
track-merge-message: false
313310
regex: (?<BranchName>.+)
314311
source-branches:
315312
- main
316313
- release
317314
- feature
318315
- pull-request
319316
is-source-branch-for: []
320-
track-merge-message: false
321317
is-main-branch: false
322318
ignore:
323319
sha: []
@@ -338,10 +334,14 @@ tracks-release-branches: false
338334
is-release-branch: false
339335
is-main-branch: false
340336
```
337+
<sup><a href='/docs/workflows/GitHubFlow/v1.yml#L1-L116' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitHubFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
338+
<!-- endSnippet -->
341339

342340
The preview built-in configuration (experimental usage only) for the `TrunkBased` workflow (`workflow: TrunkBased/preview1`) looks like:
343341

344-
```yaml
342+
<!-- snippet: /docs/workflows/TrunkBased/preview1.yml -->
343+
<a id='snippet-/docs/workflows/TrunkBased/preview1.yml'></a>
344+
```yml
345345
assembly-versioning-scheme: MajorMinorPatch
346346
assembly-file-versioning-scheme: MajorMinorPatch
347347
tag-prefix: '[vV]?'
@@ -356,55 +356,74 @@ merge-message-formats: {}
356356
update-build-number: true
357357
semantic-version-format: Strict
358358
strategies:
359-
- Mainline
360359
- ConfiguredNextVersion
360+
- Mainline
361361
branches:
362362
main:
363363
mode: ContinuousDeployment
364364
label: ''
365365
increment: Patch
366366
prevent-increment:
367367
of-merged-branch: true
368-
when-current-commit-tagged: true
369368
track-merge-target: false
369+
track-merge-message: true
370370
regex: ^master$|^main$
371371
source-branches: []
372+
is-source-branch-for: []
372373
tracks-release-branches: false
373374
is-release-branch: false
374375
is-main-branch: true
375376
pre-release-weight: 55000
376377
feature:
378+
mode: ContinuousDelivery
379+
label: '{BranchName}'
377380
increment: Minor
378-
regex: ^features?[/-](?<BranchName>.+)
379381
prevent-increment:
380382
when-current-commit-tagged: false
383+
track-merge-message: true
384+
regex: ^features?[/-](?<BranchName>.+)
381385
source-branches:
382386
- main
387+
is-source-branch-for: []
388+
is-main-branch: false
383389
pre-release-weight: 30000
384390
hotfix:
391+
mode: ContinuousDelivery
392+
label: '{BranchName}'
385393
increment: Patch
386-
regex: ^hotfix(es)?[/-](?<BranchName>.+)
387394
prevent-increment:
388395
when-current-commit-tagged: false
396+
regex: ^hotfix(es)?[/-](?<BranchName>.+)
389397
source-branches:
390398
- main
399+
is-source-branch-for: []
400+
is-release-branch: true
401+
is-main-branch: false
391402
pre-release-weight: 30000
392403
pull-request:
393404
mode: ContinuousDelivery
394405
label: PullRequest
395406
increment: Inherit
407+
prevent-increment:
408+
of-merged-branch: true
409+
when-current-commit-tagged: false
396410
label-number-pattern: '[/-](?<number>\d+)'
411+
track-merge-message: true
397412
regex: ^(pull|pull\-requests|pr)[/-]
398413
source-branches:
399414
- main
415+
- feature
416+
- hotfix
417+
is-source-branch-for: []
400418
pre-release-weight: 30000
401419
unknown:
402420
increment: Patch
403-
regex: (?<BranchName>.+)
404421
prevent-increment:
405422
when-current-commit-tagged: false
423+
regex: (?<BranchName>.+)
406424
source-branches:
407425
- main
426+
is-source-branch-for: []
408427
pre-release-weight: 30000
409428
ignore:
410429
sha: []
@@ -419,10 +438,14 @@ track-merge-target: false
419438
track-merge-message: true
420439
commit-message-incrementing: Enabled
421440
regex: ''
441+
source-branches: []
442+
is-source-branch-for: []
422443
tracks-release-branches: false
423444
is-release-branch: false
424445
is-main-branch: false
425446
```
447+
<sup><a href='/docs/workflows/TrunkBased/preview1.yml#L1-L101' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/TrunkBased/preview1.yml' title='Start of snippet'>anchor</a></sup>
448+
<!-- endSnippet -->
426449

427450
The details of the available options are as follows:
428451

0 commit comments

Comments
 (0)