From 1d486ff2941dc5a161dbdfa0f60caf4452dfe370 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Sun, 31 Dec 2023 14:27:24 +0800 Subject: [PATCH] Add macos to UpdatePlatforms --- StabilityMatrix.Core/Models/Update/UpdatePlatforms.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/StabilityMatrix.Core/Models/Update/UpdatePlatforms.cs b/StabilityMatrix.Core/Models/Update/UpdatePlatforms.cs index b6711cd5..c8ea41eb 100644 --- a/StabilityMatrix.Core/Models/Update/UpdatePlatforms.cs +++ b/StabilityMatrix.Core/Models/Update/UpdatePlatforms.cs @@ -11,6 +11,9 @@ public record UpdatePlatforms [JsonPropertyName("linux-x64")] public UpdateInfo? LinuxX64 { get; init; } + [JsonPropertyName("macos-arm64")] + public UpdateInfo? MacOsArm64 { get; init; } + public UpdateInfo? GetInfoForCurrentPlatform() { if (Compat.IsWindows) @@ -23,6 +26,11 @@ public record UpdatePlatforms return LinuxX64; } + if (Compat.IsMacOS && Compat.IsArm) + { + return MacOsArm64; + } + return null; } }