Fix updater static init order; clear staged updates on startup
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ public static class UpdateService
|
||||
public static string Repo { get; } = Environment.GetEnvironmentVariable("CVRMANAGER_UPDATE_REPO") is { Length: > 0 } r ? r : "Koneko/CVRManager";
|
||||
public const string AssetName = "CVRManager-win-x64.zip";
|
||||
|
||||
public static Version Current { get; } = Normalize(Assembly.GetEntryAssembly()?.GetName().Version ?? new Version(1, 0, 0));
|
||||
|
||||
static readonly HttpClient Http = CreateClient();
|
||||
|
||||
static HttpClient CreateClient()
|
||||
@@ -24,8 +26,6 @@ public static class UpdateService
|
||||
return http;
|
||||
}
|
||||
|
||||
public static Version Current { get; } = Normalize(Assembly.GetEntryAssembly()?.GetName().Version ?? new Version(1, 0, 0));
|
||||
|
||||
static Version Normalize(Version v) => new(v.Major, Math.Max(v.Minor, 0), Math.Max(v.Build, 0));
|
||||
|
||||
public static bool TryParseTag(string tag, out Version version)
|
||||
|
||||
Reference in New Issue
Block a user