Skip to content

Commit 8bf5b9c

Browse files
committed
Add TrunkBased workflow for experimental usage only
1 parent 78e2b16 commit 8bf5b9c

File tree

3 files changed

+88
-2
lines changed

3 files changed

+88
-2
lines changed

docs/input/docs/reference/configuration.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The following supported workflow configurations are available in GitVersion and
3737

3838
- GitFlow (GitFlow/v1)
3939
- GitHubFlow (GitHubFlow/v1)
40+
- TrunkBased (TrunkBased/preview1)
4041

4142
Example of using a `GitHubFlow` workflow with a different `tag-prefix`:
4243

@@ -338,6 +339,91 @@ is-release-branch: false
338339
is-main-branch: false
339340
```
340341

342+
The preview built-in configuration (experimental usage only) for the `TrunkBased` workflow (`workflow: TrunkBased/preview1`) looks like:
343+
344+
```yaml
345+
assembly-versioning-scheme: MajorMinorPatch
346+
assembly-file-versioning-scheme: MajorMinorPatch
347+
tag-prefix: '[vV]?'
348+
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
349+
major-version-bump-message: '\+semver:\s?(breaking|major)'
350+
minor-version-bump-message: '\+semver:\s?(feature|minor)'
351+
patch-version-bump-message: '\+semver:\s?(fix|patch)'
352+
no-bump-message: '\+semver:\s?(none|skip)'
353+
tag-pre-release-weight: 60000
354+
commit-date-format: yyyy-MM-dd
355+
merge-message-formats: {}
356+
update-build-number: true
357+
semantic-version-format: Strict
358+
strategies:
359+
- Mainline
360+
- ConfiguredNextVersion
361+
branches:
362+
main:
363+
mode: ContinuousDeployment
364+
label: ''
365+
increment: Patch
366+
prevent-increment:
367+
of-merged-branch: true
368+
when-current-commit-tagged: true
369+
track-merge-target: false
370+
regex: ^master$|^main$
371+
source-branches: []
372+
tracks-release-branches: false
373+
is-release-branch: false
374+
is-main-branch: true
375+
pre-release-weight: 55000
376+
feature:
377+
increment: Minor
378+
regex: ^features?[/-](?<BranchName>.+)
379+
prevent-increment:
380+
when-current-commit-tagged: false
381+
source-branches:
382+
- main
383+
pre-release-weight: 30000
384+
hotfix:
385+
increment: Patch
386+
regex: ^hotfix(es)?[/-](?<BranchName>.+)
387+
prevent-increment:
388+
when-current-commit-tagged: false
389+
source-branches:
390+
- main
391+
pre-release-weight: 30000
392+
pull-request:
393+
mode: ContinuousDelivery
394+
label: PullRequest
395+
increment: Inherit
396+
label-number-pattern: '[/-](?<number>\d+)'
397+
regex: ^(pull|pull\-requests|pr)[/-]
398+
source-branches:
399+
- main
400+
pre-release-weight: 30000
401+
unknown:
402+
increment: Patch
403+
regex: (?<BranchName>.+)
404+
prevent-increment:
405+
when-current-commit-tagged: false
406+
source-branches:
407+
- main
408+
pre-release-weight: 30000
409+
ignore:
410+
sha: []
411+
mode: ContinuousDelivery
412+
label: '{BranchName}'
413+
increment: Inherit
414+
prevent-increment:
415+
of-merged-branch: false
416+
when-branch-merged: false
417+
when-current-commit-tagged: true
418+
track-merge-target: false
419+
track-merge-message: true
420+
commit-message-incrementing: Enabled
421+
regex: ''
422+
tracks-release-branches: false
423+
is-release-branch: false
424+
is-main-branch: false
425+
```
426+
341427
The details of the available options are as follows:
342428

343429
### workflow

src/GitVersion.Configuration/GitVersion.Configuration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
</ItemGroup>
4141

4242
<ItemGroup>
43-
<EmbeddedResource Include="..\..\docs\input\docs\workflows\TrunkBased\v1.yml" Link="Workflows\TrunkBased\v1.yml" />
43+
<EmbeddedResource Include="..\..\docs\input\docs\workflows\GitFlow\v1.yml" Link="Workflows\GitFlow\v1.yml" />
4444
</ItemGroup>
4545

4646
<ItemGroup>
47-
<EmbeddedResource Include="..\..\docs\input\docs\workflows\GitFlow\v1.yml" Link="Workflows\GitFlow\v1.yml" />
47+
<EmbeddedResource Include="..\..\docs\input\docs\workflows\TrunkBased\preview1.yml" Link="Workflows\TrunkBased\preview1.yml" />
4848
</ItemGroup>
4949
</Project>

0 commit comments

Comments
 (0)