Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cake.Tool - How in the world do I run a specific task? #2585

Closed
VictorioBerra opened this issue Jul 26, 2019 · 5 comments
Closed

Cake.Tool - How in the world do I run a specific task? #2585

VictorioBerra opened this issue Jul 26, 2019 · 5 comments
Milestone

Comments

@VictorioBerra
Copy link

PS C:\Source\Templates> dotnet cake --help

Usage: Cake.exe [script] [--verbosity=value]
                [--showdescription] [--dryrun] [..]

Example: Cake.exe
Example: Cake.exe build.cake --verbosity=quiet
Example: Cake.exe build.cake --showdescription

Options:
    --verbosity=value    Specifies the amount of information to be displayed.
                         (Quiet, Minimal, Normal, Verbose, Diagnostic)
    --debug              Performs a debug.
    --showdescription    Shows description about tasks.
    --showtree           Shows the task dependency tree.
    --dryrun             Performs a dry run.
    --exclusive          Execute a single task without any dependencies.
    --bootstrap          Download/install modules defined by #module directives
    --version            Displays version information.
    --info               Displays additional information about Cake execution.
    --help               Displays usage information.

I see no way here on how I can specify the task to run.

Not mentioned here either https://cakebuild.net/blog/2018/08/cake-v0.30.0-released

@VictorioBerra
Copy link
Author

I just answered my question, I had to open the build.ps1 file and find the -target="whatever" which worked. Should this be documented somewhere at least?

@Insire
Copy link
Contributor

Insire commented Jul 26, 2019

it is here

@VictorioBerra
Copy link
Author

@Insire Yes but the dotnet CLI global tool Cake.Tool bootstrap wrapper for cake does not have any documentation on those.

@Roadrunner67
Copy link
Contributor

I've just made a PR #2605

@Roadrunner67
Copy link
Contributor

Roadrunner67 commented Aug 19, 2019

@VictorioBerra The answer you should have had to your issue post is something like this:

Target is a term unknown to Cake itself.

It is something we usually build into our Cake scripts, beginning with:
var target = Argument("target", "Default");
..and ending with:

RunTarget(target);
So you can choose the target from outside by adding -target=value to your command line.
If you don't, the target 'Default' will be executed (where you can place your own instruction to the user to select a specific target, if there is no logical default).

build.ps1/build.sh should only in very rare cases need modification.

@devlead devlead added this to the v0.35.0 milestone Sep 8, 2019
@devlead devlead closed this as completed in 89bcd68 Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants