mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 18:18:39 +00:00
Add build to FullVersion
This commit is contained in:
parent
03c84a5027
commit
87f16e3869
3 changed files with 15 additions and 6 deletions
|
@ -6,9 +6,9 @@ using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||||
|
|
||||||
namespace LBPUnion.ProjectLighthouse.Helpers
|
namespace LBPUnion.ProjectLighthouse.Helpers
|
||||||
{
|
{
|
||||||
public static class GitVersionHelper
|
public static class VersionHelper
|
||||||
{
|
{
|
||||||
static GitVersionHelper()
|
static VersionHelper()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -51,8 +51,17 @@ namespace LBPUnion.ProjectLighthouse.Helpers
|
||||||
|
|
||||||
public static string CommitHash { get; set; }
|
public static string CommitHash { get; set; }
|
||||||
public static string Branch { get; set; }
|
public static string Branch { get; set; }
|
||||||
public static string FullVersion => $"{ServerStatics.ServerName} {Branch}@{CommitHash}";
|
public static string FullVersion => $"{ServerStatics.ServerName} {Branch}@{CommitHash} {Build}";
|
||||||
public static bool IsDirty => CommitHash.EndsWith("-dirty");
|
public static bool IsDirty => CommitHash.EndsWith("-dirty");
|
||||||
public static bool CanCheckForUpdates { get; set; }
|
public static bool CanCheckForUpdates { get; set; }
|
||||||
|
|
||||||
|
public const string Build =
|
||||||
|
#if DEBUG
|
||||||
|
"Debug";
|
||||||
|
#elif RELEASE
|
||||||
|
"Release";
|
||||||
|
#else
|
||||||
|
"Unknown";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -69,8 +69,8 @@
|
||||||
<div class="ui black attached inverted segment">
|
<div class="ui black attached inverted segment">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
|
||||||
<p>Page generated by @GitVersionHelper.FullVersion.</p>
|
<p>Page generated by @VersionHelper.FullVersion.</p>
|
||||||
@if (GitVersionHelper.IsDirty)
|
@if (VersionHelper.IsDirty)
|
||||||
{
|
{
|
||||||
<p>This page was generated using a modified version of Project Lighthouse. Please make sure you are properly disclosing the source code to any users who may be using this instance.</p>
|
<p>This page was generated using a modified version of Project Lighthouse. Please make sure you are properly disclosing the source code to any users who may be using this instance.</p>
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace LBPUnion.ProjectLighthouse
|
||||||
Logger.AddLogger(new LighthouseFileLogger());
|
Logger.AddLogger(new LighthouseFileLogger());
|
||||||
|
|
||||||
Logger.Log("Welcome to Project Lighthouse!", LoggerLevelStartup.Instance);
|
Logger.Log("Welcome to Project Lighthouse!", LoggerLevelStartup.Instance);
|
||||||
Logger.Log($"Running {GitVersionHelper.FullVersion}", LoggerLevelStartup.Instance);
|
Logger.Log($"Running {VersionHelper.FullVersion}", LoggerLevelStartup.Instance);
|
||||||
|
|
||||||
// This loads the config, see ServerSettings.cs for more information
|
// This loads the config, see ServerSettings.cs for more information
|
||||||
Logger.Log("Loaded config file version " + ServerSettings.Instance.ConfigVersion, LoggerLevelStartup.Instance);
|
Logger.Log("Loaded config file version " + ServerSettings.Instance.ConfigVersion, LoggerLevelStartup.Instance);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue