Skip to content

GH2470: call multiple tasks from cli and pass them to run target#4054

Merged
devlead merged 2 commits intocake-build:developfrom
FrankRay78:2470-Call-multiple-tasks-from-CLI-and-pass-them-to-RunTarget
Nov 7, 2022
Merged

GH2470: call multiple tasks from cli and pass them to run target#4054
devlead merged 2 commits intocake-build:developfrom
FrankRay78:2470-Call-multiple-tasks-from-CLI-and-pass-them-to-RunTarget

Conversation

@FrankRay78
Copy link
Contributor

This PR fully implements #2470, 'Call multiple tasks from CLI and pass them to RunTarget'

Significant unit test coverage has been added for the changes, including minor refactoring and improvements to the existing codebase when encountered.

Significant effort was undertaken to ensure the changes introduced in this PR maintained backward compatibility.

Given the following cake build script,

var targets = Arguments<string>("target", "A");

Task("A");

Task("B");

Task("C");

RunTargets(targets);

This PR extends Cake to operate as follows:

image

image

image

@devlead devlead changed the title 2470 call multiple tasks from cli and pass them to run target GH2470: call multiple tasks from cli and pass them to run target Nov 7, 2022
FrankRay78 and others added 2 commits November 7, 2022 22:16
* Extend CakeEngine to accept multiple run targets
* fixes #4054
Copy link
Member

@devlead devlead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@devlead devlead merged commit a8286e1 into cake-build:develop Nov 7, 2022
@devlead
Copy link
Member

devlead commented Nov 7, 2022

@FrankRay78 your changes have been merged, thanks for your contribution 👍

@FrankRay78 FrankRay78 deleted the 2470-Call-multiple-tasks-from-CLI-and-pass-them-to-RunTarget branch November 9, 2022 13:05
@juwens
Copy link

juwens commented Feb 23, 2023

@devlead and @FrankRay78 is this supposed to work with frosting?

when i do build.ps1 --target=A --target=B only B gets executed.

@punker76
Copy link

@devlead and @FrankRay78 is this supposed to work with frosting?

when i do build.ps1 --target=A --target=B only B gets executed.

@juwens You must use RunTargets instead RunTarget in your cake script

RunTargets(Arguments<string>("target", new []{ "Default" }))

Then you can run multiple targets

dotnet-cake.exe build.cake --target=target1 --target=target2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants