This commit is contained in:
2022-10-01 17:14:19 +03:00
parent 6d73ec7f24
commit a39f7bb0c9
2 changed files with 5 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
<StartupObject />
<SignAssembly>False</SignAssembly>
<IsPublishable>True</IsPublishable>
<AssemblyVersion>1.0.0.14</AssemblyVersion>
<AssemblyVersion>1.0.0.13</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -401,16 +401,13 @@ public class Program
else
{
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);
bar.Start();
Console.WriteLine("Downloading update ...");
await ServerCom.DownloadFileNoProgressAsync(url, "./update.zip");
await Functions.ExtractArchive("./update.zip", "./", null, UnzipProgressType.PercentageFromNumberOfFiles);
bar.Stop("Console is now Updated");
Process.Start("./DiscordBot /procKill " + Process.GetCurrentProcess().Id);
await File.WriteAllTextAsync("Install.sh", "#!/bin/bash\nunzip -qq update.zip -d ./\nrm update.zip\nchmod +x SethDiscordBot\n./DiscordBot");
Process.Start("Install.sh").WaitForExit();
Environment.Exit(0);
}
//Environment.Exit(0);
}
break;