mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Better
This commit is contained in:
@@ -337,6 +337,7 @@ namespace TGServerService
|
||||
return;
|
||||
}
|
||||
}
|
||||
string CurrentSha;
|
||||
try
|
||||
{
|
||||
bool silent;
|
||||
@@ -378,7 +379,7 @@ namespace TGServerService
|
||||
|
||||
deleteExcludeList.Add(".git");
|
||||
Program.CopyDirectory(RepoPath, resurrectee, deleteExcludeList);
|
||||
UpdateLiveSha();
|
||||
CurrentSha = GetHead(false, out string error);
|
||||
//just the tip
|
||||
const string GitLogsDir = "/.git/logs";
|
||||
Program.CopyDirectory(RepoPath + GitLogsDir, resurrectee + GitLogsDir);
|
||||
@@ -525,6 +526,7 @@ namespace TGServerService
|
||||
TGServerService.WriteWarning("Postcompile hook failed!", TGServerService.EventID.DMCompileError);
|
||||
return;
|
||||
}
|
||||
UpdateLiveSha(CurrentSha);
|
||||
var msg = String.Format("Compile complete!{0}", !staged ? "" : " Server will update next round.");
|
||||
SendMessage("DM: " + msg, ChatMessageType.DeveloperInfo);
|
||||
TGServerService.WriteInfo(msg, TGServerService.EventID.DMCompileSuccess);
|
||||
|
||||
@@ -1187,14 +1187,14 @@ namespace TGServerService
|
||||
return Properties.Settings.Default.PythonPath;
|
||||
}
|
||||
|
||||
void UpdateLiveSha()
|
||||
void UpdateLiveSha(string newSha)
|
||||
{
|
||||
if (LoadRepo() != null)
|
||||
return;
|
||||
var B = Repo.Branches[LiveTrackingBranch];
|
||||
if (B != null)
|
||||
Repo.Branches.Remove(B);
|
||||
Repo.CreateBranch(LiveTrackingBranch, Repo.Head.Tip);
|
||||
Repo.CreateBranch(LiveTrackingBranch, newSha);
|
||||
}
|
||||
|
||||
public string LiveSha()
|
||||
|
||||
Reference in New Issue
Block a user