Skip to content

Rename TrunkBased Version Strategy to Mainline #4032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
6 changes: 3 additions & 3 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
* The `BranchPrefixToTrim` configuration property has been removed. `RegularExpression` is now used to capture named groups instead.
* Default `RegularExpression` for feature branches is changed from `^features?[/-]` to `^features?[/-](?<BranchName>.+)` to support using `{BranchName}` out-of-the-box
* Default `RegularExpression` for unknown branches is changed from `.*` to `(?<BranchName>.+)` to support using `{BranchName}` out-of-the-box
* The `Mainline` mode and the related implementation has been removed completely. The new `TrunkBased` version strategy should be used instead.
* The `TrunkBased` workflow doesn't support downgrading the increment for calculating the next version. This is the case if e.g. a bump messages has been defined which is lower than the branch increment.
* The `Mainline` mode and the related implementation has been removed completely. The new `Mainline` version strategy should be used instead.
* The `Mainline` version strategy doesn't support downgrading the increment for calculating the next version. This is the case if e.g. a bump messages has been defined which is lower than the branch increment.
* The branch related property `is-mainline` in the configuration system has been renamed to `is-main-branch`
* The versioning mode has been renamed to deployment mode and consists of following values:
* ManualDeployment (previously ContinuousDelivery)
Expand All @@ -52,7 +52,7 @@
* TaggedCommit
* TrackReleaseBranches
* VersionInBranchName
* TrunkBased
* Mainline
* The initialization wizard has been removed.
* On the `develop`, `release` and `hotfix` branch the introduced branch related property `prevent-increment.when-current-commit-tagged` has been set to `false` to get the incremented instead of the tagged semantic version.
* When setting the "ignore commits before" parameter to a future value, an exception will occur if no commits are found on the current branch. This behavior mimics that of an empty repository.
Expand Down
2 changes: 1 addition & 1 deletion docs/input/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following supported workflow configurations are available in GitVersion and
- GitFlow (GitFlow/v1)
- GitHubFlow (GitHubFlow/v1)

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

```yaml
workflow: GitHubFlow/v1
Expand Down
6 changes: 3 additions & 3 deletions schemas/6.0/GitVersion.configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@
"type": "string"
},
"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 'TrunkBased'.",
"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'.",
"type": "array",
"items": {
"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 'TrunkBased'.",
"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'.",
"enum": [
"None",
"Fallback",
Expand All @@ -189,7 +189,7 @@
"TaggedCommit",
"TrackReleaseBranches",
"VersionInBranchName",
"TrunkBased"
"Mainline"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private TrunkBasedConfigurationBuilder()
SemanticVersionFormat = ConfigurationConstants.DefaultSemanticVersionFormat,
VersionStrategies = [
VersionStrategies.ConfiguredNextVersion,
VersionStrategies.TrunkBased
VersionStrategies.Mainline
],
TagPrefix = ConfigurationConstants.DefaultTagPrefix,
VersionInBranchPattern = ConfigurationConstants.DefaultVersionInBranchPattern,
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 @@ -129,7 +129,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: 'ConfiguredNextVersion', 'MergeMessage', 'TaggedCommit', 'TrackReleaseBranches', 'VersionInBranchName' and 'TrunkBased'.")]
[JsonPropertyDescription($"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'.")]
public VersionStrategies[] VersionStrategies { get; internal set; } = [];

[JsonIgnore]
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Configuration/Workflows/TrunkBased/v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ merge-message-formats: {}
update-build-number: true
semantic-version-format: Strict
strategies:
- TrunkBased
- Mainline
- ConfiguredNextVersion
branches:
main:
Expand Down
Loading
Loading