Adds gitversioning for releases (#209)
This commit is contained in:
parent
584d4bc1d9
commit
192cf70d20
9 changed files with 82 additions and 58 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.5" />
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.2.31">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.IO.Pipelines" Version="4.7.2" />
|
||||
<PackageReference Include="Zlib.Bindings" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@
|
|||
"Microsoft.Extensions.Logging.Abstractions": "3.1.5"
|
||||
}
|
||||
},
|
||||
"Nerdbank.GitVersioning": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.2.31, )",
|
||||
"resolved": "3.2.31",
|
||||
"contentHash": "19grBnpqHLxViOt1cwE+cI+brQ2swdm4gfM97P+9KbbgWGfXtdy4EmpVAkUZ3MgntFYYbUvfldM4pUOmks5q0w=="
|
||||
},
|
||||
"System.IO.Pipelines": {
|
||||
"type": "Direct",
|
||||
"requested": "[4.7.2, )",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue