Skip to content

Commit

Permalink
Make UpgradeHelper compliant with .NET RID catalog
Browse files Browse the repository at this point in the history
Fetching updates return an error because the UpgradeHelper returns an invalid RID, and we use the RID to create automated builds. This updates the UpgradeHelper to be compliant with the catalog.
  • Loading branch information
breadbyte authored Mar 29, 2023
1 parent 74d2932 commit cd39c1e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions MinecraftClient/UpgradeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,27 +241,27 @@ private static string GetOSIdentifier()
{
string OSPlatformName;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
OSPlatformName = "Windows";
OSPlatformName = "win";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
OSPlatformName = "Linux";
OSPlatformName = "linux";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
OSPlatformName = "OSX";
OSPlatformName = "osx";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
OSPlatformName = "FreeBSD";
OSPlatformName = "freebsd";
else
return string.Empty;

string architecture = RuntimeInformation.ProcessArchitecture switch
{
Architecture.X86 => "X86",
Architecture.X64 => "X64",
Architecture.Arm => "Arm32",
Architecture.Arm64 => "Arm64",
Architecture.Wasm => "Wasm",
Architecture.S390x => "S390x",
Architecture.LoongArch64 => "LoongArch64",
Architecture.Armv6 => "Armv6",
Architecture.Ppc64le => "Ppc64le",
Architecture.X86 => "x86",
Architecture.X64 => "x64",
Architecture.Arm => "arm32",
Architecture.Arm64 => "arm64",
Architecture.Wasm => "wasm",
Architecture.S390x => "s390x",
Architecture.LoongArch64 => "loongarch64",
Architecture.Armv6 => "armv6",
Architecture.Ppc64le => "ppc64le",
_ => RuntimeInformation.ProcessArchitecture.ToString(),
};

Expand Down

0 comments on commit cd39c1e

Please sign in to comment.