Wait ten minutes before updating
This commit is contained in:
parent
01433f0de6
commit
b3e285f92f
@ -16,7 +16,7 @@ using System.Resources;
|
||||
|
||||
|
||||
// Version informationr(
|
||||
[assembly: AssemblyVersion("1.5.2.79")]
|
||||
[assembly: AssemblyFileVersion("1.5.2.79")]
|
||||
[assembly: AssemblyVersion("1.5.2.80")]
|
||||
[assembly: AssemblyFileVersion("1.5.2.80")]
|
||||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
||||
|
||||
|
@ -138,7 +138,12 @@ namespace RageCoop.Server
|
||||
var end = versionLine.LastIndexOf('\"');
|
||||
var latest = Version.Parse(versionLine.AsSpan(start, end - start));
|
||||
if (latest <= Version) { return; }
|
||||
API.SendChatMessage($"New server version found: {latest}, downloading update...");
|
||||
|
||||
// wait ten minutes for the build to complete
|
||||
API.SendChatMessage($"New server version found: {latest}, server will update in 10 minutes");
|
||||
Thread.Sleep(10 * 60 * 1000);
|
||||
|
||||
API.SendChatMessage("downloading update...");
|
||||
var downloadURL = $"https://github.com/RAGECOOP/RAGECOOP-V/releases/download/nightly/RageCoop.Server-{GetRID()}.zip";
|
||||
if (Directory.Exists("Update")) { Directory.Delete("Update", true); }
|
||||
HttpHelper.DownloadFile(downloadURL, "Update.zip", null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user