Adds gitversioning for releases (#209)

This commit is contained in:
Kamron Batman 2020-09-02 17:50:57 -07:00 committed by GitHub
parent 584d4bc1d9
commit 192cf70d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 82 additions and 58 deletions

View file

@ -119,7 +119,11 @@ namespace Server
public static Assembly Assembly { get; set; }
public static Version Version => Assembly.GetName().Version;
// Assembly file version
public static Version Version => Version.Parse(
FileVersionInfo.GetVersionInfo(Assembly.Location).FileVersion
);
public static Process Process { get; private set; }
public static Thread Thread { get; private set; }
@ -354,16 +358,14 @@ namespace Server
if (BaseDirectory.Length > 0)
Directory.SetCurrentDirectory(BaseDirectory);
var ver = Assembly.GetName().Version ?? new Version();
Utility.PushColor(ConsoleColor.Green);
// Added to help future code support on forums, as a 'check' people can ask for to it see if they recompiled core or not
Console.WriteLine(
"ModernUO - [https://github.com/modernuo/modernuo] Version {0}.{1}.{2}.{3}",
ver.Major,
ver.Minor,
ver.Build,
ver.Revision
Version.Major,
Version.Minor,
Version.Build,
Version.Revision
);
Console.WriteLine("Core: Running on {0}\n", RuntimeInformation.FrameworkDescription);
Utility.PopColor();