cake-build / cake

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

GH-3279: Cake runner arguments as build script arguments #4142

Closed FrankRay78 closed 3 weeks ago

FrankRay78 commented 1 year ago

This PR fully addresses, https://github.com/cake-build/cake/issues/3279 "Allow users to use any of the Cake runner arguments as build script arguments" (and indirectly https://github.com/cake-build/cake/issues/2794, which should be closed)

The feature has been implemented for both Cake and also Frosting, unit tests written for each to exercise this new functionality and protect against any regressions.

eg. cake --version will (continue to) run the built-in cake version feature, cake--version=1.2.3 will run the build feature and make the argument and value accessible to the cake build script.

This PR enables the passing of any of the built-in cake runner arguments, when found on the command line with an accompanying value, to the cake build script being executed.

**This PR will remain broken ** until spectre.console version 0.47.0 or above has been integrated, as it relies on a new configuration option that has been added to the spectre.console library particularly for this PR.

I will update the cake spectre.console package reference and push the change to this PR (fixing the build), once 0.47.0 is available on NuGet. FYI @patriksvensson

augustoproiete commented 1 year ago

Thanks @FrankRay78 tests look good. Let's wait for Spectre.Console vNext to ship and get this one merged 💪🏻

FrankRay78 commented 1 year ago

This PR is now blocked by https://github.com/cake-build/cake/issues/4157, "Upgrading to spectre.console 0.47.0 breaks the cake build"

FrankRay78 commented 8 months ago

Thanks @FrankRay78 tests look good. Let's wait for Spectre.Console vNext to ship and get this one merged 💪🏻

Hello @augustoproiete, I've now submitted the PR to upgrade spectre.console to the next version: https://github.com/cake-build/cake/pull/4236 . Apologies it's taken so long, there was a breaking change I found hard to work out.

If / when the PR is merged, I'll look to rebase this branch and see about getting this PR over the line. Never did I expect https://github.com/cake-build/cake/issues/3279, which this PR relates to, to take more than a year...

image

So much upstream spectre.console CLI work was needed to be done first.

FrankRay78 commented 8 months ago

Hello @augustoproiete, I've now been able to complete this PR given spectre.console has been upgraded to 0.47.0.