patch
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<StartupObject />
|
<StartupObject />
|
||||||
<SignAssembly>False</SignAssembly>
|
<SignAssembly>False</SignAssembly>
|
||||||
<IsPublishable>True</IsPublishable>
|
<IsPublishable>True</IsPublishable>
|
||||||
<AssemblyVersion>1.0.0.14</AssemblyVersion>
|
<AssemblyVersion>1.0.0.13</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -401,16 +401,13 @@ public class Program
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
string url = $"https://github.com/Wizzy69/SethDiscordBot/releases/download/v{newVersion}/net6.0_linux.zip";
|
string url = $"https://github.com/Wizzy69/SethDiscordBot/releases/download/v{newVersion}/net6.0_linux.zip";
|
||||||
Console_Utilities.ProgressBar bar = new Console_Utilities.ProgressBar(ProgressBarType.NO_END);
|
Console.WriteLine("Downloading update ...");
|
||||||
bar.Start();
|
|
||||||
await ServerCom.DownloadFileNoProgressAsync(url, "./update.zip");
|
await ServerCom.DownloadFileNoProgressAsync(url, "./update.zip");
|
||||||
await Functions.ExtractArchive("./update.zip", "./", null, UnzipProgressType.PercentageFromNumberOfFiles);
|
await File.WriteAllTextAsync("Install.sh", "#!/bin/bash\nunzip -qq update.zip -d ./\nrm update.zip\nchmod +x SethDiscordBot\n./DiscordBot");
|
||||||
bar.Stop("Console is now Updated");
|
Process.Start("Install.sh").WaitForExit();
|
||||||
|
Environment.Exit(0);
|
||||||
Process.Start("./DiscordBot /procKill " + Process.GetCurrentProcess().Id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//Environment.Exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user