Skip to content

Commit fee6a2e

Browse files
committed
Removed more unneeded code
1 parent 66592d4 commit fee6a2e

File tree

5 files changed

+0
-177
lines changed

5 files changed

+0
-177
lines changed
Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
namespace GitVersion
22
{
3-
using System;
4-
53
static partial class ExtensionMethods
64
{
75
public static string GetCanonicalBranchName(this string branchName)
@@ -17,70 +15,9 @@ public static string GetCanonicalBranchName(this string branchName)
1715
return string.Format("refs/heads/{0}", branchName);
1816
}
1917

20-
public static bool IsHotfix(this string branchName)
21-
{
22-
return branchName.StartsWith("hotfix-") || branchName.StartsWith("hotfix/");
23-
}
24-
25-
public static string GetHotfixSuffix(this string branchName)
26-
{
27-
return branchName.TrimStart("hotfix-").TrimStart("hotfix/");
28-
}
29-
30-
public static bool IsRelease(this string branchName)
31-
{
32-
return branchName.StartsWith("release-") || branchName.StartsWith("release/");
33-
}
34-
35-
public static string GetReleaseSuffix(this string branchName)
36-
{
37-
return branchName.TrimStart("release-").TrimStart("release/");
38-
}
39-
40-
public static string GetUnknownBranchSuffix(this string branchName)
41-
{
42-
var unknownBranchSuffix = branchName.Split('-', '/');
43-
if (unknownBranchSuffix.Length == 1)
44-
return branchName;
45-
return unknownBranchSuffix[1];
46-
}
47-
48-
public static string GetSuffix(this string branchName, BranchType branchType)
49-
{
50-
switch (branchType)
51-
{
52-
case BranchType.Hotfix:
53-
return branchName.GetHotfixSuffix();
54-
55-
case BranchType.Release:
56-
return branchName.GetReleaseSuffix();
57-
58-
case BranchType.Unknown:
59-
return branchName.GetUnknownBranchSuffix();
60-
61-
default:
62-
throw new NotSupportedException(string.Format("Unexpected branch type {0}.", branchType));
63-
}
64-
}
65-
66-
public static bool IsDevelop(this string branchName)
67-
{
68-
return branchName == "develop";
69-
}
70-
71-
public static bool IsMaster(this string branchName)
72-
{
73-
return branchName == "master";
74-
}
75-
7618
public static bool IsPullRequest(this string branchName)
7719
{
7820
return branchName.Contains("pull/") || branchName.Contains("pull-requests/") || branchName.Contains("pr/");
7921
}
80-
81-
public static bool IsSupport(this string branchName)
82-
{
83-
return branchName.ToLower().StartsWith("support-") || branchName.ToLower().StartsWith("support/");
84-
}
8522
}
8623
}

GitVersionCore/GitFlow/BranchClassifier.cs

Lines changed: 0 additions & 57 deletions
This file was deleted.

GitVersionCore/GitVersionCore.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
<Compile Include="WarningException.cs" />
108108
<Compile Include="Extensions\ExtensionMethods.cs" />
109109
<Compile Include="GitDirFinder.cs" />
110-
<Compile Include="GitFlow\BranchClassifier.cs" />
111110
<Compile Include="GitFlow\BranchType.cs" />
112111
<Compile Include="MergeMessageParser.cs" />
113112
<Compile Include="GitVersionContext.cs" />

GitVersionTask.Tests/BranchClassifierTests.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.

GitVersionTask.Tests/GitVersionTask.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
<Compile Include="ApprovalTestsConfig.cs" />
8787
<Compile Include="AssemblyInfoBuilderTests.cs" />
8888
<Compile Include="AssemblyLocation.cs" />
89-
<Compile Include="BranchClassifierTests.cs" />
9089
<Compile Include="Mocks\MockBuildEngine.cs" />
9190
<Compile Include="VersionAndBranchFinderTests.cs" />
9291
<Compile Include="LambdaEqualityHelperFixture.cs" />

0 commit comments

Comments
 (0)