From 8f861ff335464859270d1539b67908a54a9a3f00 Mon Sep 17 00:00:00 2001 From: Toru the Red Fox Date: Wed, 27 Jul 2022 20:42:45 +0100 Subject: [PATCH] document envver stuff --- ProjectLighthouse/Helpers/VersionHelper.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ProjectLighthouse/Helpers/VersionHelper.cs b/ProjectLighthouse/Helpers/VersionHelper.cs index c3d5c311..f07ad991 100644 --- a/ProjectLighthouse/Helpers/VersionHelper.cs +++ b/ProjectLighthouse/Helpers/VersionHelper.cs @@ -71,9 +71,16 @@ public static class VersionHelper public static string CommitHash { get; set; } public static string Branch { get; set; } + /// + /// The amount of commits that currently exist in the local copy of the Git repository. + /// Not reliable as versioning if shallow cloning is used, with using the hash of the current commit being more reliable in that case. + /// public static string OrdinalCommitNumber { get; set; } - public static string EnvVer => $"{ServerConfiguration.Instance.Customization.EnvironmentName} {OrdinalCommitNumber}"; // what's sent as lbpEnvVer to game - public static string FullVersion => $"Project Lighthouse {Branch}@{CommitHash} {Build} ({(ServerConfiguration.Instance.Customization.UseLessReliableNumericRevisionNumberingSystem ? EnvVer : ServerConfiguration.Instance.Customization.EnvironmentName)})"; + /// + /// The server's branding (environment version) to show to LBP clients. Shows the environment name next to the revision. + /// + public static string EnvVer => $"{ServerConfiguration.Instance.Customization.EnvironmentName} {OrdinalCommitNumber}"; + public static string FullVersion => $"Project Lighthouse {ServerConfiguration.Instance.Customization.EnvironmentName} {Branch}@{CommitHash} {Build}"; public static bool IsDirty => CommitHash.EndsWith("-dirty") || CommitsOutOfDate != 1 || CommitHash == "invalid" || Branch == "invalid"; public static int CommitsOutOfDate { get; set; } public static bool CanCheckForUpdates { get; set; }