Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/input/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down Expand Up @@ -327,6 +328,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down Expand Up @@ -911,6 +913,7 @@ The configuration accepts the following values:
* TrackReleaseBranches
* VersionInBranchName
* Mainline
* MergeCommit

[1145]: https://github.com/GitTools/GitVersion/issues/1145

Expand Down
1 change: 1 addition & 0 deletions docs/input/docs/reference/mdsource/configuration.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ The configuration accepts the following values:
* TrackReleaseBranches
* VersionInBranchName
* Mainline
* MergeCommit

[1145]: https://github.com/GitTools/GitVersion/issues/1145

Expand Down
13 changes: 13 additions & 0 deletions docs/input/docs/reference/version-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ merged into the current branch.

Will increment: depends on the value of `prevent-increment-of-merged-branch-version`

### Merge commit

Uses the most recent version tag on the target branch as the base version and
consolidates increments across the target branch's first-parent history after that
tag. Recognized merges contribute the merged branch's increment; commits made
directly on the target branch and merges whose source cannot be resolved contribute
the target branch's increment. The highest effective increment wins, and repeated
increments of the same kind do not accumulate. This strategy applies when
`of-merged-branch` is enabled under `prevent-increment` on a main branch and the
merge message identifies at least one source branch.

Will increment: according to the highest effective merged-branch or target-branch increment

### GitVersion.yml

Returns the value of the `next-version` property in the config file.
Expand Down
1 change: 1 addition & 0 deletions docs/input/docs/workflows/GitFlow/v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down
1 change: 1 addition & 0 deletions docs/input/docs/workflows/GitHubFlow/v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down
5 changes: 3 additions & 2 deletions schemas/7.0/GitVersion.configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
"$ref": "#/$defs/hashSetOfString"
},
"strategies": {
"description": "Specifies which version strategies (one or more) will be used to determine the next version. Following values are available: 'ConfiguredNextVersion', 'MergeMessage', 'TaggedCommit', 'TrackReleaseBranches', 'VersionInBranchName' and 'Mainline'.",
"description": "Specifies which version strategies (one or more) will be used to determine the next version. Following values are available: 'ConfiguredNextVersion', 'MergeMessage', 'TaggedCommit', 'TrackReleaseBranches', 'VersionInBranchName', 'Mainline' and 'MergeCommit'.",
"type": "array",
"items": {
"enum": [
Expand All @@ -335,7 +335,8 @@
"TaggedCommit",
"TrackReleaseBranches",
"VersionInBranchName",
"Mainline"
"Mainline",
"MergeCommit"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ strategies:
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- MergeCommit
tag-pre-release-weight: 60000
tag-prefix: "[vV]?"
track-merge-message: true
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Configuration/GitVersionConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public string? NextVersion
? VersionCalculation.VersionStrategies.None : VersionStrategies.Aggregate((one, another) => one | another);

[JsonPropertyName("strategies")]
[JsonPropertyDescription($"Specifies which version strategies (one or more) will be used to determine the next version. Following values are available: '{nameof(VersionCalculation.VersionStrategies.ConfiguredNextVersion)}', '{nameof(VersionCalculation.VersionStrategies.MergeMessage)}', '{nameof(VersionCalculation.VersionStrategies.TaggedCommit)}', '{nameof(VersionCalculation.VersionStrategies.TrackReleaseBranches)}', '{nameof(VersionCalculation.VersionStrategies.VersionInBranchName)}' and '{nameof(VersionCalculation.VersionStrategies.Mainline)}'.")]
[JsonPropertyDescription($"Specifies which version strategies (one or more) will be used to determine the next version. Following values are available: '{nameof(VersionCalculation.VersionStrategies.ConfiguredNextVersion)}', '{nameof(VersionCalculation.VersionStrategies.MergeMessage)}', '{nameof(VersionCalculation.VersionStrategies.TaggedCommit)}', '{nameof(VersionCalculation.VersionStrategies.TrackReleaseBranches)}', '{nameof(VersionCalculation.VersionStrategies.VersionInBranchName)}', '{nameof(VersionCalculation.VersionStrategies.Mainline)}' and '{nameof(VersionCalculation.VersionStrategies.MergeCommit)}'.")]
public VersionStrategies[] VersionStrategies { get; set; } = [];

[JsonIgnore]
Expand Down
Loading
Loading