diff --git a/.gitignore b/.gitignore index a665340..ec4f792 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ *.user *.userosscache *.sln.docstates +Build/ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs diff --git a/PseudoCode.Core/PseudoCode.Core.csproj b/PseudoCode.Core/PseudoCode.Core.csproj index 7fa9112..093549a 100644 --- a/PseudoCode.Core/PseudoCode.Core.csproj +++ b/PseudoCode.Core/PseudoCode.Core.csproj @@ -4,8 +4,8 @@ net6.0 enable disable - 1.3.4 - 1.3.4 + 1.3.5 + 1.3.5 diff --git a/PseudoCode.Update/Program.cs b/PseudoCode.Update/Program.cs index 61a08f3..fcf46a6 100644 --- a/PseudoCode.Update/Program.cs +++ b/PseudoCode.Update/Program.cs @@ -24,15 +24,15 @@ public class Program } }; - public static Version CurrentVersion = typeof(PseudoProgram).Assembly.GetName().Version; + public static readonly Version CurrentVersion = typeof(PseudoProgram).Assembly.GetName().Version; - public static async Task RunProcessAsync(Process p) + private static async Task RunProcessAsync(Process p) { p.Start(); await p.WaitForExitAsync(); } - public static async Task DownloadAssetAsync(IEnumerable objs, string s) + private static async Task DownloadAssetAsync(IEnumerable objs, string s) { var obj = objs.FirstOrDefault(o => o.Assets.Any(a => a.Name == s)); if (obj == null) @@ -70,10 +70,11 @@ await HttpClient.GetStringAsync( "https://gitee.com/api/v5/repos/williamcraft/pseudocode-releases/releases?page=1&per_page=20&direction=desc"); // Console.WriteLine(resultStr); var resultObjs = JsonSerializer.Deserialize(new JsonTextReader(new StringReader(resultStr))); + var selfExe = Assembly.GetExecutingAssembly().Location; + Console.WriteLine(selfExe); if (OperatingSystem.IsWindows()) { - var selfExe = Assembly.GetExecutingAssembly().Location; if (await DownloadAssetAsync(resultObjs, WinZipName)) { File.Move(selfExe, $"{selfExe}.bak");