From 8dcfb9266f536527fc2d38950b52054c978c58f0 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Tue, 19 May 2026 14:07:39 +0200 Subject: [PATCH 1/4] Add macOS ARM64 as default platform target Add osx-arm64 to Platform.Defaults so tools are built for Apple Silicon by default. Also add Arm64 to GitHubReleaseCook.NamingArch to prevent KeyNotFoundException when creating release filenames for ARM64 artifacts. --- RELEASE_NOTES.md | 7 +++++++ .../IntegrationTests/BakeTests/GoLangServiceTests.cs | 4 ++++ .../IntegrationTests/BakeTests/NetCoreConsoleTests.cs | 6 ++++++ .../Bake.Tests/UnitTests/Services/PlatformParserTests.cs | 2 ++ Source/Bake/Cooking/Cooks/GitHub/GitHubReleaseCook.cs | 1 + Source/Bake/ValueObjects/Platform.cs | 3 ++- 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ba18d595..6bf4c668 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,10 @@ +# 0.41 + +* New: macOS ARM64 (`osx-arm64`) is now a default platform target for tool + builds, alongside `win-x64`, `linux-x64`, and `osx-x64` +* Fix: GitHub release filename generation now supports ARM64 architecture, + preventing a crash when releasing ARM64 artifacts + # 0.40 * Fix: GitHub release ZIPs for .NET tools now include native DLLs from the diff --git a/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs b/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs index 5ea96b18..8fe28156 100644 --- a/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs +++ b/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs @@ -58,6 +58,10 @@ public async Task Run() 1L.MB(), "osx-x64", "golang-service"); + AssertFileExists( + 1L.MB(), + "osx-arm64", + "golang-service"); AssertFileExists( 1L.MB(), "win-x64", diff --git a/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs b/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs index 2ea85a39..7f9832b0 100644 --- a/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs +++ b/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs @@ -131,6 +131,12 @@ private void AssertSuccessfulArtifacts() AssertFileExists( 50L.MB(), "bin", "Release", "publish", "win-x64", "NetCore.Console.exe"); + AssertFileExists( + 50L.MB(), + "bin", "Release", "publish", "osx-x64", "NetCore.Console"); + AssertFileExists( + 50L.MB(), + "bin", "Release", "publish", "osx-arm64", "NetCore.Console"); } [TestCase(ExitCodes.Core.NoCommand)] diff --git a/Source/Bake.Tests/UnitTests/Services/PlatformParserTests.cs b/Source/Bake.Tests/UnitTests/Services/PlatformParserTests.cs index 69f8fdab..9025b123 100644 --- a/Source/Bake.Tests/UnitTests/Services/PlatformParserTests.cs +++ b/Source/Bake.Tests/UnitTests/Services/PlatformParserTests.cs @@ -32,6 +32,8 @@ public class PlatformParserTests : TestFor { [TestCase("win/x86", ExecutableOperatingSystem.Windows, ExecutableArchitecture.Intel32)] [TestCase("linux/x64", ExecutableOperatingSystem.Linux, ExecutableArchitecture.Intel64)] + [TestCase("mac/arm64", ExecutableOperatingSystem.MacOSX, ExecutableArchitecture.Arm64)] + [TestCase("macos/arm64", ExecutableOperatingSystem.MacOSX, ExecutableArchitecture.Arm64)] public void Success( string str, ExecutableOperatingSystem executableOs, diff --git a/Source/Bake/Cooking/Cooks/GitHub/GitHubReleaseCook.cs b/Source/Bake/Cooking/Cooks/GitHub/GitHubReleaseCook.cs index c84e858c..46f7e21b 100644 --- a/Source/Bake/Cooking/Cooks/GitHub/GitHubReleaseCook.cs +++ b/Source/Bake/Cooking/Cooks/GitHub/GitHubReleaseCook.cs @@ -46,6 +46,7 @@ public class GitHubReleaseCook : Cook { [ExecutableArchitecture.Intel32] = "x86", [ExecutableArchitecture.Intel64] = "x86_64", + [ExecutableArchitecture.Arm64] = "arm64", }; private readonly ILogger _logger; diff --git a/Source/Bake/ValueObjects/Platform.cs b/Source/Bake/ValueObjects/Platform.cs index 143f7a50..1b112b0c 100644 --- a/Source/Bake/ValueObjects/Platform.cs +++ b/Source/Bake/ValueObjects/Platform.cs @@ -27,11 +27,12 @@ namespace Bake.ValueObjects { public class Platform { - public static Platform[] Defaults { get; } = + public static Platform[] Defaults { get; } = { new(ExecutableOperatingSystem.Windows, ExecutableArchitecture.Intel64), new(ExecutableOperatingSystem.Linux, ExecutableArchitecture.Intel64), new(ExecutableOperatingSystem.MacOSX, ExecutableArchitecture.Intel64), + new(ExecutableOperatingSystem.MacOSX, ExecutableArchitecture.Arm64), }; public static Platform Any { get; } = new(ExecutableOperatingSystem.Any, ExecutableArchitecture.Any); From d12baae152b923f6622edd6e600ddf28ce1c2317 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Tue, 19 May 2026 14:09:17 +0200 Subject: [PATCH 2/4] Replace osx-x64 with osx-arm64 in default platforms Apple stopped selling Intel Macs in 2022 and ARM64 is now the dominant macOS architecture. Users targeting Intel Macs can still use --target-platform=macos/x64. --- RELEASE_NOTES.md | 5 +++-- .../IntegrationTests/BakeTests/GoLangServiceTests.cs | 4 ---- .../IntegrationTests/BakeTests/NetCoreConsoleTests.cs | 3 --- Source/Bake/ValueObjects/Platform.cs | 1 - 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6bf4c668..a0b76b74 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,7 +1,8 @@ # 0.41 -* New: macOS ARM64 (`osx-arm64`) is now a default platform target for tool - builds, alongside `win-x64`, `linux-x64`, and `osx-x64` +* New: Default macOS platform target changed from `osx-x64` to `osx-arm64` + (Apple Silicon). Users on Intel Macs can still target `osx-x64` via + `--target-platform` * Fix: GitHub release filename generation now supports ARM64 architecture, preventing a crash when releasing ARM64 artifacts diff --git a/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs b/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs index 8fe28156..129c4ff7 100644 --- a/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs +++ b/Source/Bake.Tests/IntegrationTests/BakeTests/GoLangServiceTests.cs @@ -54,10 +54,6 @@ public async Task Run() 1L.MB(), "linux-x64", "golang-service"); - AssertFileExists( - 1L.MB(), - "osx-x64", - "golang-service"); AssertFileExists( 1L.MB(), "osx-arm64", diff --git a/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs b/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs index 7f9832b0..f8fe102c 100644 --- a/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs +++ b/Source/Bake.Tests/IntegrationTests/BakeTests/NetCoreConsoleTests.cs @@ -131,9 +131,6 @@ private void AssertSuccessfulArtifacts() AssertFileExists( 50L.MB(), "bin", "Release", "publish", "win-x64", "NetCore.Console.exe"); - AssertFileExists( - 50L.MB(), - "bin", "Release", "publish", "osx-x64", "NetCore.Console"); AssertFileExists( 50L.MB(), "bin", "Release", "publish", "osx-arm64", "NetCore.Console"); diff --git a/Source/Bake/ValueObjects/Platform.cs b/Source/Bake/ValueObjects/Platform.cs index 1b112b0c..9e562b36 100644 --- a/Source/Bake/ValueObjects/Platform.cs +++ b/Source/Bake/ValueObjects/Platform.cs @@ -31,7 +31,6 @@ public class Platform { new(ExecutableOperatingSystem.Windows, ExecutableArchitecture.Intel64), new(ExecutableOperatingSystem.Linux, ExecutableArchitecture.Intel64), - new(ExecutableOperatingSystem.MacOSX, ExecutableArchitecture.Intel64), new(ExecutableOperatingSystem.MacOSX, ExecutableArchitecture.Arm64), }; public static Platform Any { get; } = new(ExecutableOperatingSystem.Any, ExecutableArchitecture.Any); From a979ef513302b8f8a9e32fee4576bb4ce9a4a397 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 20 May 2026 21:19:02 +0200 Subject: [PATCH 3/4] Upgrade test project --- TestProjects/NetCore.Console/NetCore.Console.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestProjects/NetCore.Console/NetCore.Console.csproj b/TestProjects/NetCore.Console/NetCore.Console.csproj index 88acb33f..2cf5b51c 100644 --- a/TestProjects/NetCore.Console/NetCore.Console.csproj +++ b/TestProjects/NetCore.Console/NetCore.Console.csproj @@ -3,7 +3,7 @@ Exe awesome-cli-tool - netcoreapp3.1 + net6.0 true true magic-command From caf6940a1960c1458589abfe0be46d83f262dacc Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 20 May 2026 21:20:45 +0200 Subject: [PATCH 4/4] Upgrade test project, .NET 8 this time --- TestProjects/NetCore.Console/NetCore.Console.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestProjects/NetCore.Console/NetCore.Console.csproj b/TestProjects/NetCore.Console/NetCore.Console.csproj index 2cf5b51c..14820e7f 100644 --- a/TestProjects/NetCore.Console/NetCore.Console.csproj +++ b/TestProjects/NetCore.Console/NetCore.Console.csproj @@ -3,7 +3,7 @@ Exe awesome-cli-tool - net6.0 + net8.0 true true magic-command