diff --git a/.gitignore b/.gitignore
index 26095a5e..1b96c9bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ lighthouse.config.json
gitBranch.txt
gitVersion.txt
gitRemotes.txt
+gitUnpushed.txt
ProjectLighthouse/.vscode/tasks.json
ProjectLighthouse/.vscode/launch.json
logs/Startup.log
diff --git a/ProjectLighthouse.sln.DotSettings b/ProjectLighthouse.sln.DotSettings
index 15d27f85..a3b1a293 100644
--- a/ProjectLighthouse.sln.DotSettings
+++ b/ProjectLighthouse.sln.DotSettings
@@ -133,4 +133,5 @@
True
True
True
+ True
True
\ No newline at end of file
diff --git a/ProjectLighthouse/Helpers/VersionHelper.cs b/ProjectLighthouse/Helpers/VersionHelper.cs
index ea79fb61..172c6478 100644
--- a/ProjectLighthouse/Helpers/VersionHelper.cs
+++ b/ProjectLighthouse/Helpers/VersionHelper.cs
@@ -26,6 +26,8 @@ namespace LBPUnion.ProjectLighthouse.Helpers
// linq is a serious and painful catastrophe but its useful so i'm gonna keep using it
Remotes = lines.Select(line => line.Split("\t")[1]).ToArray();
+ CommitsOutOfDate = readManifestFile("gitUnpushed.txt").Split('\n').Length;
+
CanCheckForUpdates = true;
}
catch
@@ -64,7 +66,8 @@ 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") || CommitHash == "invalid" || Branch == "invalid";
+ public static bool IsDirty => CommitHash.EndsWith("-dirty") || CommitsOutOfDate != 0 || CommitHash == "invalid" || Branch == "invalid";
+ public static int CommitsOutOfDate { get; set; }
public static bool CanCheckForUpdates { get; set; }
public static string[] Remotes { get; set; }
diff --git a/ProjectLighthouse/Pages/Debug/VersionInfoPage.cshtml b/ProjectLighthouse/Pages/Debug/VersionInfoPage.cshtml
index dce46680..4bd4cb77 100644
--- a/ProjectLighthouse/Pages/Debug/VersionInfoPage.cshtml
+++ b/ProjectLighthouse/Pages/Debug/VersionInfoPage.cshtml
@@ -16,6 +16,7 @@
CommitHash: @VersionHelper.CommitHash
IsDirty: @VersionHelper.IsDirty
CanCheckForUpdates: @VersionHelper.CanCheckForUpdates
+CommitsOutOfDate: @VersionHelper.CommitsOutOfDate
Remotes
@foreach (string remote in VersionHelper.Remotes)
diff --git a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml
index 4b4c8eb3..85b4ec24 100644
--- a/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml
+++ b/ProjectLighthouse/Pages/Layouts/BaseLayout.cshtml
@@ -151,7 +151,7 @@
Potential License Violation
-
This instance is a public-facing instance that has been modified without the changes committed. You may be in violation of the GNU Affero General Public License v3.0.
+
This instance is a public-facing instance that has been modified without the changes published. You may be in violation of the GNU Affero General Public License v3.0.
If you believe this is an error, please create an issue with the output of git status
ran from the root of the server source code in the description on our issue tracker.
If not, please publish the source code somewhere accessible to your users.
diff --git a/ProjectLighthouse/ProjectLighthouse.csproj b/ProjectLighthouse/ProjectLighthouse.csproj
index 15951f12..53058e0f 100644
--- a/ProjectLighthouse/ProjectLighthouse.csproj
+++ b/ProjectLighthouse/ProjectLighthouse.csproj
@@ -35,12 +35,17 @@
Always
+
+
+ Always
+
+