Skip to content

Commit 05377a4

Browse files
committed
add main to the master branch regex in the default configuration
1 parent 53344b5 commit 05377a4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/input/docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ upgrade.
283283
```yaml
284284
branches:
285285
master:
286-
regex: ^master
286+
regex: ^master|main$
287287
mode: ContinuousDelivery
288288
tag: ''
289289
increment: Patch

src/GitVersionCore.Tests/Configuration/ConfigProviderTests.CanWriteOutEffectiveConfiguration.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ branches:
3131
increment: Patch
3232
prevent-increment-of-merged-branch-version: true
3333
track-merge-target: false
34-
regex: ^master$
34+
regex: ^master|main$
3535
source-branches:
3636
- develop
3737
- release

src/GitVersionCore/Model/Configuration/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public override string ToString()
115115
public const string HotfixBranchRegex = "^hotfix(es)?[/-]";
116116
public const string SupportBranchRegex = "^support[/-]";
117117
public const string DevelopBranchRegex = "^dev(elop)?(ment)?$";
118-
public const string MasterBranchRegex = "^master$";
118+
public const string MasterBranchRegex = "^master|main$";
119119
public const string MasterBranchKey = "master";
120120
public const string ReleaseBranchKey = "release";
121121
public const string FeatureBranchKey = "feature";

0 commit comments

Comments
 (0)