Skip to content

Commit 1771443

Browse files
committed
fix(build): improve cross-platform compatibility
- Add shebang to build.sh for proper shell execution - Remove Windows-style line endings from build.sh - Skip net462 tests on non-Windows platforms in TestTask.cs These changes ensure the build system works correctly across different operating systems by providing proper shell script execution headers and preventing framework-specific tests from running on incompatible platforms.
1 parent 776efa4 commit 1771443

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

build.sh

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
#!/bin/bash
2+
13
dotnet build ./build/LocalStack.Build/LocalStack.Build.csproj > /dev/null 2>&1
24
dotnet run --project ./build/LocalStack.Build/LocalStack.Build.csproj --no-launch-profile --no-build -- "$@"

build/LocalStack.Build/CakeTasks/TestTask.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ public override void Run(BuildContext context)
5454
}
5555
}
5656

57-
// .NET Framework testing on non-Windows platforms
58-
// - Modern .NET includes built-in Mono runtime
59-
// - Test platform still requires external Mono installation on Linux
6057
if (targetFramework == "net462" && !context.IsRunningOnWindows())
6158
{
62-
string platform = context.IsRunningOnLinux() ? "Linux (with external Mono)" : "macOS (built-in Mono)";
63-
context.Information($"Running .NET Framework tests on {platform}");
59+
context.Warning("Skipping net462 tests on non-Windows platform");
60+
continue;
6461
}
6562

6663
string testFilePrefix = targetFramework.Replace('.', '-');

0 commit comments

Comments
 (0)