Taskfile config
Taskfile files
| File match |
Taskfile.yaml
Taskfile.dist.yaml
Taskfile.yml
Taskfile.dist.yml
|
|---|---|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/taskfile-config/latest.json |
| Source | https://taskfile.dev/schema.json |
Validate with Lintel
npx @lintel/lintel check
Schema for Taskfile files.
All of
Definitions
Overrides the name of the task in the output when a task is run. Supports variables.
A short description of the task. This is displayed when calling task --list.
One or more prompts that will be presented before a task is run. Declining will cancel running the current and any subsequent tasks.
A longer description of the task. This is displayed when calling task --summary [task].
A list of alternative names by which the task can be called.
A list of sources to check before running this task. Relevant for checksum and timestamp methods. Can be file paths or star globs.
A list of files meant to be generated by this task. Relevant for timestamp method. Can be file paths or star globs.
A list of commands to check if this task should run. The task is skipped otherwise. This overrides method, sources and generates.
A list of commands to check if this task should run. If a condition is not met, the task will error.
The directory in which this task should run. Defaults to the current working directory.
Enables POSIX shell options for all of a task's commands. See https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
Enables Bash shell options for all of a task's commands. See https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
A list of .env file paths to be parsed.
Hides task name and command from output. The command's output will still be redirected to STDOUT and STDERR. When combined with the --list flag, task descriptions will be hidden.
Tells task that the command is interactive.
Stops a task from being callable on the command line. It will also be omitted from the output when used with --list.
Defines which method is used to check the task is up-to-date. timestamp will compare the timestamp of the sources and generates files. checksum will check the checksum (You probably want to ignore the .task folder in your .gitignore file). none skips any validation and always run the task.
Defines a string to prefix the output of tasks running in parallel. Only used when the output mode is prefixed.
Continue execution if errors happen while executing commands.
A shell command to evaluate. If the exit code is non-zero, the task is skipped.
1 nested properties
List of variables that must be defined for the task to run
Configures a task to run in watch mode automatically.
When running tasks in parallel, stop all tasks if one fails.
The value will be treated as a command and the output assigned to the variable
The value will be used to lookup the value of another variable which will then be assigned to this variable
The value will be treated as a literal map type and stored in the variable
Name of the task to run
Hides task name and command from output. The command's output will still be redirected to STDOUT and STDERR.
A shell command to evaluate. If the exit code is non-zero, the command is skipped.
Command to run
Silent mode disables echoing of command before Task runs it
Enables POSIX shell options for this command. See https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
Enables Bash shell options for this command. See https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
Prevent command from aborting the execution of task even after receiving a status code of 1
A shell command to evaluate. If the exit code is non-zero, the command is skipped.
Run a command when the task completes. This command will run even when the task fails
Name of the command to defer
Hides task name and command from output. The command's output will still be redirected to STDOUT and STDERR.
Command to run
Silent mode disables echoing of command before Task runs it
Task to run
Silent mode disables echoing of command before Task runs it
A list of values to iterate over
The task attribute to iterate over
Which variables to iterate over. The variable will be split using any whitespace character by default. This can be changed by using the split attribute.
Name of the variable to iterate over
String to split the variable on
What the loop variable should be named
A matrix of values to iterate over
Command to run. If that command returns 1, the condition will fail
Failure message to display when the condition fails
File or glob pattern to exclude from the list
3 nested properties
Swallows command output on zero exit code
List of variables that must be defined for the task to run