Difficulty: beginner
Estimated Time: 5-10 minutes

Welcome to an Introduction on how to use the Cake Build Command Line.

In this section of the course, we are going to learn about how you can pass different command line arguments into Cake, in order to perform different actions, for example:

  • Changing the logging verbosity
  • Executing a dry-run of the build script
  • Showing descriptions of the tasks that are available

NOTE:

This course makes use of a katacoda base image which already have Cake installed, and ready to use. As a result, the steps that you will see within this course are likely going to be slightly different to others that you might have seen, since the typical bootstrapper script is not required.

i.e. rather than running:

.\build.ps1

or

./build.sh

You can simply run cake to initiate the build script.

However, everything else should be exactly the same. Let's get started.

You've completed your first Cake scenario!

Cake Command Line

Step 1 of 7

Step 1 - Cake Help

By default, Cake will always immediately attempt to execute the build script, with a set of standard arguments. However, it is possible to change these arguments, in order to take different actions. The available actions can be found in the help menu.

Task

In order to access the Cake help system, we simply need to pass the --help argument to Cake.

Either type cake --help in the terminal opposite, or click here:

cake --help

This will show all of the available command line arguments that can be passed to Cake.

NOTE: It is also possible to use:

cake -?