Skip to content

Commit

Permalink
Updated timestamp tests to latest gitversion
Browse files Browse the repository at this point in the history
  • Loading branch information
John Simons committed Jul 21, 2014
1 parent a365a4c commit ead651b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/NServiceBus.Core/GitFlowVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static class GitFlowVersion
static GitFlowVersion()
{
var assembly = typeof(GitFlowVersion).Assembly;
var gitFlowVersionInformationType = assembly.GetType("NServiceBus.Core.GitFlowVersionInformation", true);
var gitFlowVersionInformationType = assembly.GetType("GitVersionInformation", true);
var fieldInfo = gitFlowVersionInformationType.GetField("AssemblyFileVersion");
var assemblyFileVersion = Version.Parse((string)fieldInfo.GetValue(null));
MajorMinor = assemblyFileVersion.ToString(2);
Expand Down
4 changes: 2 additions & 2 deletions src/NServiceBus.Core/Licensing/TimestampReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public static DateTime GetBuildTimestamp()
{
var attribute = (dynamic)Assembly.GetExecutingAssembly()
.GetCustomAttributes(false)
.First(x => x.GetType().Name == "TimestampAttribute");
.First(x => x.GetType().Name == "ReleaseDateAttribute");

return UniversalDateParser.Parse((string)attribute.Timestamp);
return UniversalDateParser.Parse((string)attribute.OriginalDate);
}
}
}
2 changes: 1 addition & 1 deletion src/NServiceBus/NServiceBusVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class NServiceBusVersion
static NServiceBusVersion()
{
var assembly = typeof(NServiceBusVersion).Assembly;
var gitFlowVersionInformationType = assembly.GetType("NServiceBus.GitFlowVersionInformation", true);
var gitFlowVersionInformationType = assembly.GetType("GitVersionInformation", true);
var fieldInfo = gitFlowVersionInformationType.GetField("AssemblyFileVersion");
var assemblyFileVersion = System.Version.Parse((string)fieldInfo.GetValue(null));
Version = assemblyFileVersion.ToString(3);
Expand Down

0 comments on commit ead651b

Please sign in to comment.