Skip to content

Commit 8754796

Browse files
committed
fix support naming with slash
fixes #197
1 parent e6a6fb0 commit 8754796

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

GitVersionCore/GitFlow/BranchClassifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static bool IsPullRequest(this Branch branch)
3232

3333
public static bool IsSupport(this Branch branch)
3434
{
35-
return branch.Name.ToLower().StartsWith("support-");
35+
return branch.Name.ToLower().StartsWith("support-") || branch.Name.StartsWith("support/");
3636
}
3737
}
3838
}

GitVersionTask.Tests/BranchClassifierTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ public void IsRelease()
2424
Assert.IsFalse(new MockBranch("release").IsRelease());
2525
}
2626
[Test]
27+
public void IsSupport()
28+
{
29+
Assert.IsTrue(new MockBranch("support-1").IsSupport());
30+
Assert.IsTrue(new MockBranch("support/1").IsSupport());
31+
Assert.IsTrue(new MockBranch("Support-1").IsSupport());
32+
Assert.IsTrue(new MockBranch("Support/1").IsSupport());
33+
Assert.IsFalse(new MockBranch("release").IsRelease());
34+
}
35+
[Test]
2736
public void IsDevelop()
2837
{
2938
Assert.IsTrue(new MockBranch("develop").IsDevelop());

0 commit comments

Comments
 (0)