mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-31 09:18:38 +00:00
Add dirty commit warning
This commit is contained in:
parent
479057fdcc
commit
76aeb54da0
1 changed files with 18 additions and 1 deletions
|
@ -17,11 +17,27 @@ namespace LBPUnion.ProjectLighthouse.Helpers
|
|||
}
|
||||
catch
|
||||
{
|
||||
Logger.Log("Project Lighthouse was built incorrectly. Please make sure git is available when building.", LoggerLevelStartup.Instance);
|
||||
Logger.Log
|
||||
(
|
||||
"Project Lighthouse was built incorrectly. Please make sure git is available when building. " +
|
||||
"Because of this, you will not be notified of updates.",
|
||||
LoggerLevelStartup.Instance
|
||||
);
|
||||
CommitHash = "invalid";
|
||||
Branch = "invalid";
|
||||
CanCheckForUpdates = false;
|
||||
}
|
||||
|
||||
if (IsDirty)
|
||||
{
|
||||
Logger.Log
|
||||
(
|
||||
"This is 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.",
|
||||
LoggerLevelStartup.Instance
|
||||
);
|
||||
CanCheckForUpdates = false;
|
||||
}
|
||||
}
|
||||
|
||||
private static string readManifestFile(string fileName)
|
||||
|
@ -34,6 +50,7 @@ namespace LBPUnion.ProjectLighthouse.Helpers
|
|||
|
||||
public static string CommitHash { get; set; }
|
||||
public static string Branch { get; set; }
|
||||
public static bool IsDirty => CommitHash.EndsWith("-dirty");
|
||||
public static bool CanCheckForUpdates { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue