diff --git a/ProjectLighthouse/Helpers/VersionHelper.cs b/ProjectLighthouse/Helpers/VersionHelper.cs index 6ba19acc..ea79fb61 100644 --- a/ProjectLighthouse/Helpers/VersionHelper.cs +++ b/ProjectLighthouse/Helpers/VersionHelper.cs @@ -64,14 +64,14 @@ namespace LBPUnion.ProjectLighthouse.Helpers public static string CommitHash { get; set; } public static string Branch { get; set; } public static string FullVersion => $"{ServerStatics.ServerName} {Branch}@{CommitHash} {Build}"; - public static bool IsDirty => CommitHash.EndsWith("-dirty"); + public static bool IsDirty => CommitHash.EndsWith("-dirty") || CommitHash == "invalid" || Branch == "invalid"; public static bool CanCheckForUpdates { get; set; } public static string[] Remotes { get; set; } public const string Build = #if DEBUG "Debug"; - #elif RELEASE + #elif RELEASE "Release"; #else "Unknown"; diff --git a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml index ee35c549..4b4c8eb3 100644 --- a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml +++ b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml @@ -145,6 +145,18 @@ + @if (!ServerStatics.IsDebug && VersionHelper.IsDirty) + { +
+ }