Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ branches:
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: master
regex: master$
source-branches:
- develop
- release
Expand Down
14 changes: 14 additions & 0 deletions src/GitVersionCore.Tests/IntegrationTests/OtherScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ public void AllowNotHavingMaster()
}
}

[Test]
public void AllowHavingVariantsStartingWithMaster()
{
using (var fixture = new EmptyRepositoryFixture())
{
fixture.Repository.MakeACommit();
fixture.Repository.MakeATaggedCommit("1.0.0");
fixture.Repository.MakeACommit();
Commands.Checkout(fixture.Repository, fixture.Repository.CreateBranch("masterfix"));

fixture.AssertFullSemver("1.0.1-masterfix.1+1");
}
}

[Test]
public void AllowHavingMainInsteadOfMaster()
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore/Configuration/ConfigurationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ConfigurationProvider
public const string HotfixBranchRegex = "hotfix(es)?[/-]";
public const string SupportBranchRegex = "support[/-]";
public const string DevelopBranchRegex = "dev(elop)?(ment)?$";
public const string MasterBranchRegex = "master";
public const string MasterBranchRegex = "master$";
public const string MasterBranchKey = "master";
public const string ReleaseBranchKey = "release";
public const string FeatureBranchKey = "feature";
Expand Down