cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.84k stars 722 forks source link

Add FreeBSD Platform Detection #4312

Open Thefrank opened 1 month ago

Thefrank commented 1 month ago

Closes https://github.com/cake-build/cake/issues/4310

This PR adds FreeBSD as a detected platform to Cake. It also includes a platform test.

As .NET Standard does not support FreeBSD directly, and not to break .NET Standard compatibility, the function RuntimeInformation.IsOSPlatform(OSPlatform.Create()) is used.

After building I did find test failures that seem to originate from VerifyTests as it does not support FreeBSD either. I will open a PR at that repo to address it. Tests are attached below

Even after this, Cake will not dogfood under FreeBSD as the tool GitVersion uses Lib2GitSharp which consumes a NuGet made by https://github.com/libgit2/libgit2sharp.nativebinaries that does not include a FreeBSD library. GitVersion uses Cake to build.

Zip'd results using /logger:html for tests results.zip