@@ -37,7 +37,19 @@ created. Modify this to suit your needs.
3737
3838## Global configuration
3939
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:
4153
4254` ` ` yaml
4355assembly-versioning-scheme: MajorMinorPatch
@@ -61,10 +73,10 @@ strategies:
6173- VersionInBranchName
6274branches:
6375 develop:
64- take-incremented-version : TakeAlwaysIncrementedVersion
6576 label: alpha
6677 increment: Minor
6778 prevent-increment-of-merged-branch-version: false
79+ prevent-increment-when-tagged: false
6880 track-merge-target: true
6981 regex: ^dev(elop)?(ment)?$
7082 source-branches: []
@@ -89,10 +101,10 @@ branches:
89101 pre-release-weight: 55000
90102 release:
91103 mode: ManualDeployment
92- take-incremented-version : TakeAlwaysIncrementedVersion
93104 label: beta
94105 increment: None
95106 prevent-increment-of-merged-branch-version: true
107+ prevent-increment-when-tagged: false
96108 track-merge-target: false
97109 regex: ^releases?[/-]
98110 source-branches:
@@ -138,6 +150,7 @@ branches:
138150 mode: ManualDeployment
139151 label: beta
140152 increment: Inherit
153+ prevent-increment-when-tagged: false
141154 regex: ^hotfix(es)?[/-]
142155 source-branches:
143156 - release
@@ -177,10 +190,10 @@ branches:
177190ignore:
178191 sha: []
179192mode: ContinuousDelivery
180- take-incremented-version : TakeTaggedOtherwiseIncrementedVersion
181193label: '{BranchName}'
182194increment: Inherit
183195prevent-increment-of-merged-branch-version: false
196+ prevent-increment-when-tagged: true
184197track-merge-target: false
185198track-merge-message: true
186199commit-message-incrementing: Enabled
@@ -192,11 +205,195 @@ is-release-branch: false
192205is-main-branch: false
193206` ` `
194207
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+
195392The details of the available options are as follows :
196393
197394# ## workflow
198395
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.
200397
201398# ## next-version
202399
@@ -266,10 +463,6 @@ The default value is `{InformationalVersion}`.
266463Sets the `mode` of how GitVersion should create a new version. Read more at
267464[deployment modes][modes].
268465
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-
273466# ## increment
274467
275468The 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
612805better version source proposed by the `MergeMessageBaseVersionStrategy`. For
613806more details and an in-depth analysis, please see [the discussion][2506].
614807
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+
615812# ## label-number-pattern
616813
617814Pull 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
706903* TaggedCommit
707904* TrackReleaseBranches
708905* VersionInBranchName
709- * TrunkBased
906+ * TrunkBased
0 commit comments