mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 17:48:41 +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
|
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";
|
CommitHash = "invalid";
|
||||||
Branch = "invalid";
|
Branch = "invalid";
|
||||||
CanCheckForUpdates = false;
|
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)
|
private static string readManifestFile(string fileName)
|
||||||
|
@ -34,6 +50,7 @@ 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 bool IsDirty => CommitHash.EndsWith("-dirty");
|
||||||
public static bool CanCheckForUpdates { get; set; }
|
public static bool CanCheckForUpdates { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue