Skip to content

Commit 2d602c3

Browse files
committed
remove redundant code
1 parent e884547 commit 2d602c3

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

GitVersionCore/BuildServers/AppVeyor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override string[] GenerateSetParameterMessage(string name, string value)
6565

6666
return new[]
6767
{
68-
string.Format("Adding Environment Variable. name='GitVersion.{0}' value='{1}']", name, value),
68+
string.Format("Adding Environment Variable. name='GitVersion.{0}' value='{1}']", name, value)
6969
};
7070
}
7171
}

GitVersionCore/GitFlow/BranchFinders/VersionOnMasterFinder.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public VersionPoint Execute(GitVersionContext context, DateTimeOffset olderThan)
1818
{
1919
Major = shortVersion.Major,
2020
Minor = shortVersion.Minor,
21-
Timestamp = commit.When(),
22-
CommitSha = commit.Sha,
2321
};
2422
}
2523
}
@@ -31,17 +29,13 @@ public VersionPoint Execute(GitVersionContext context, DateTimeOffset olderThan)
3129
{
3230
Major = shortVersionFromMergeMessage.Major,
3331
Minor = shortVersionFromMergeMessage.Minor,
34-
Timestamp = commit.When(),
35-
CommitSha = commit.Sha,
3632
};
3733
}
3834
}
3935
return new VersionPoint
4036
{
4137
Major = 0,
4238
Minor = 1,
43-
Timestamp = DateTimeOffset.MinValue,
44-
CommitSha = null,
4539
};
4640
}
4741

GitVersionCore/GitHubFlow/OtherBranchVersionFinder.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ public SemanticVersion FindVersion(GitVersionContext context)
1818
}
1919
}
2020

21-
protected SemanticVersion FindVersion(
22-
GitVersionContext context,
23-
string baseBranchName)
21+
SemanticVersion FindVersion(GitVersionContext context, string baseBranchName)
2422
{
2523
var versionString = GetUnknownBranchSuffix(context.CurrentBranch);
2624
if (!versionString.Contains("."))

GitVersionCore/GitVersionFinder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public static SemanticVersion GetSemanticVersion(Repository repository)
2626
Logger.WriteInfo("Running against branch: " + gitVersionContext.CurrentBranch.Name);
2727
return versionForRepositoryFinder.FindVersion(gitVersionContext);
2828
}
29-
public static bool ShouldGitHubFlowVersioningSchemeApply(IRepository repo)
29+
30+
static bool ShouldGitHubFlowVersioningSchemeApply(IRepository repo)
3031
{
3132
return repo.FindBranch("develop") == null;
3233
}

GitVersionCore/VersionPoint.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
namespace GitVersion
22
{
3-
using System;
4-
53
class VersionPoint
64
{
75
public int Major;
86
public int Minor;
9-
public DateTimeOffset Timestamp;
10-
public string CommitSha;
117
}
128
}

GitVersionTask.Tests/UpdateAssemblyInfoTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void SetUp()
124124
}
125125

126126
[TearDown]
127-
public void TearDown()
127+
public new void TearDown()
128128
{
129129
BuildServerList.ResetSelector();
130130
}

0 commit comments

Comments
 (0)