Added the current CPU architecture to the metadata (#402)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-04-15 08:08:39 +02:00
1 parent c715b38f41
commit b153b9c4e9
16 files changed
+177 -71

No files matched your search

+3 -1
View File
@@ -1,5 +1,7 @@
using System.Runtime.InteropServices;
using SharedTools;
namespace Build.Tools;
public static class Environment
@@ -7,7 +9,7 @@ public static class Environment
public const string DOTNET_VERSION = "net9.0";
public static readonly Encoding UTF8_NO_BOM = new UTF8Encoding(false);
private static readonly Dictionary<RID, string> ALL_RIDS = Enum.GetValues<RID>().Select(rid => new KeyValuePair<RID, string>(rid, rid.ToName())).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
private static readonly Dictionary<RID, string> ALL_RIDS = Enum.GetValues<RID>().Select(rid => new KeyValuePair<RID, string>(rid, rid.AsMicrosoftRid())).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
public static bool IsWorkingDirectoryValid()
{
-15
View File
@@ -1,15 +0,0 @@
namespace Build.Tools;
public enum RID
{
NONE,
WIN_X64,
WIN_ARM64,
LINUX_X64,
LINUX_ARM64,
OSX_X64,
OSX_ARM64,
}
-18
View File
@@ -1,18 +0,0 @@
namespace Build.Tools;
public static class RIDExtensions
{
public static string ToName(this RID rid) => rid switch
{
RID.WIN_X64 => "win-x64",
RID.WIN_ARM64 => "win-arm64",
RID.LINUX_X64 => "linux-x64",
RID.LINUX_ARM64 => "linux-arm64",
RID.OSX_X64 => "osx-x64",
RID.OSX_ARM64 => "osx-arm64",
_ => string.Empty,
};
}