Skip to content

Commit

Permalink
Revert "Improvement for Mutagen get version logic"
Browse files Browse the repository at this point in the history
This reverts commit dd5bfbb.
  • Loading branch information
Noggog committed Aug 2, 2023
1 parent 4147015 commit 06ef8b4
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions Mutagen.Bethesda.Synthesis/Versioning/ProvideCurrentVersions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ProvideCurrentVersions()
return new VersionQuery(
MutagenSha: GetGitSha(typeof(FormKey).Assembly),
SynthesisSha: GetGitSha(typeof(BaseSynthesis.Constants).Assembly),
MutagenVersion: GetVersion(typeof(FormKey)),
MutagenVersion: GetVersion(AssemblyVersions.For<FormKey>()),
SynthesisVersion: GetVersion(AssemblyVersions.For<BaseSynthesis.Codes>()),
NewtonsoftVersion: GetVersion(AssemblyVersions.For<Newtonsoft.Json.JsonSerializer>()));
Expand All @@ -67,22 +67,6 @@ private string GetVersion(AssemblyVersions versions)
}
}

private string GetVersion(Type t)
{
try
{
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(t.Assembly.Location);

return fvi.FileVersion ?? "Unknown";
}
catch (Exception e)
{
throw new Exception(
$"Error retrieving product version for {t}",
e);
}
}

private string? GetGitSha(Assembly assemb)
{
try
Expand Down

0 comments on commit 06ef8b4

Please sign in to comment.