You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
||`--status`|`bool`|`false`| Exits with non-zero exit code if any of the given tasks is not up-to-date. |
@@ -80,16 +80,16 @@ Some environment variables can be overriden to adjust Task behavior.
80
80
| Attribute | Type | Default | Description |
81
81
| - | - | - | - |
82
82
|`version`|`string`|| Version of the Taskfile. The current version is `3`. |
83
-
|`includes`|[`map[string]Include`](#include)|| Additional Taskfiles to be included. |
84
83
|`output`|`string`|`interleaved`| Output mode. Available options: `interleaved`, `group` and `prefixed`. |
85
84
|`method`|`string`|`checksum`| Default method in this Taskfile. Can be overriden in a task by task basis. Available options: `checksum`, `timestamp` and `none`. |
86
-
|`silent`|`bool`|`false`| Default "silent" options for this Taskfile. If `false`, can be overidden with `true` in a task by task basis. |
87
-
|`run`|`string`|`always`| Default "run" option for this Taskfile. Available options: `always`, `once` and `when_changed`. |
88
-
|`interval`|`string`|`5s`| Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
|`env`|[`map[string]Variable`](#variable)|| Global environment. |
85
+
|`includes`|[`map[string]Include`](#include)|| Additional Taskfiles to be included. |
86
+
|`vars`|[`map[string]Variable`](#variable)|| A set of global variables. |
87
+
|`env`|[`map[string]Variable`](#variable)|| A set of global environment variables. |
88
+
|`tasks`|[`map[string]Task`](#task)||A set of task definitions. |
89
+
|`silent`|`bool`|`false`| Default 'silent' options for this Taskfile. If `false`, can be overidden with `true` in a task by task basis. |
91
90
|`dotenv`|`[]string`|| A list of `.env` file paths to be parsed. |
92
-
|`tasks`|[`map[string]Task`](#task)|| The task definitions. |
91
+
|`run`|`string`|`always`| Default 'run' option for this Taskfile. Available options: `always`, `once` and `when_changed`. |
92
+
|`interval`|`string`|`5s`| Sets a different watch interval when using `--watch`, the default being 5 seconds. This string should be a valid [Go Duration](https://pkg.go.dev/time#ParseDuration). |
93
93
94
94
### Include
95
95
@@ -98,8 +98,9 @@ Some environment variables can be overriden to adjust Task behavior.
98
98
|`taskfile`|`string`|| The path for the Taskfile or directory to be included. If a directory, Task will look for files named `Taskfile.yml` or `Taskfile.yaml` inside that directory. If a relative path, resolved relative to the directory containing the including Taskfile. |
99
99
|`dir`|`string`| The parent Taskfile directory | The working directory of the included tasks when run. |
100
100
|`optional`|`bool`|`false`| If `true`, no errors will be thrown if the specified file does not exist. |
101
-
|`internal`|`bool`|`false`|If `true`, tasks will not be callable from the command line and will be omitted from both `--list` and `--list-all`. |
101
+
|`internal`|`bool`|`false`|Stops any task in the included Taskfile from being callable on the command line. These commands will also be omitted from the output when used with `--list`. |
102
102
|`aliases`|`[]string`|| Alternative names for the namespace of the included Taskfile. |
103
+
|`vars`|`map[string]Variable`|| A set of variables to apply to the included Taskfile. |
103
104
104
105
:::info
105
106
@@ -116,25 +117,26 @@ includes:
116
117
117
118
| Attribute | Type | Default | Description |
118
119
| - | - | - | - |
119
-
| `desc` | `string` | | A short description of the task. This is listed when calling `task --list`. |
120
-
| `summary` | `string` | | A longer description of the task. This is listed when calling `task --summary [task]`. |
121
-
| `aliases` | `[]string` | | Alternative names for the task. |
120
+
| `cmds` | [`[]Command`](#command) | | A list of shell commands to be executed. |
121
+
| `deps` | [`[]Dependency`](#dependency) | | A list of dependencies of this task. Tasks defined here will run in parallel before this task. |
122
122
| `label` | `string` | | Overrides the name of the task in the output when a task is run. Supports variables. |
123
-
| `sources` | `[]string` | | List of sources to check before running this task. Relevant for `checksum` and `timestamp` methods. Can be file paths or star globs. |
124
-
| `dir` | `string` | | The current directory which this task should run. |
125
-
| `method` | `string` | `checksum` | Method used by this task. Default to the one declared globally or `checksum`. Available options: `checksum`, `timestamp` and `none` |
126
-
| `silent` | `bool` | `false` | Skips some output for this task. Note that STDOUT and STDERR of the commands will still be redirected. |
127
-
| `internal` | `bool` | `false` | If `true`, this task will not be callable from the command line and will be omitted from both `--list` and `--list-all`. |
123
+
| `desc` | `string` | | A short description of the task. This is displayed when calling `task --list`. |
124
+
| `summary` | `string` | | A longer description of the task. This is displayed when calling `task --summary [task]`. |
125
+
| `aliases` | `[]string` | | A list of alternative names by which the task can be called. |
126
+
| `sources` | `[]string` | | A list of sources to check before running this task. Relevant for `checksum` and `timestamp` methods. Can be file paths or star globs. |
127
+
| `generates` | `[]string` | | A list of files meant to be generated by this task. Relevant for `timestamp` method. Can be file paths or star globs. |
128
+
| `status` | `[]string` | | A list of commands to check if this task should run. The task is skipped otherwise. This overrides `method`, `sources` and `generates`. |
129
+
| `preconditions` | [`[]Precondition`](#precondition) | | A list of commands to check if this task should run. If a condition is not met, the task will error. |
130
+
| `dir` | `string` | | The directory in which this task should run. Defaults to the current working directory. |
131
+
| `vars` | [`map[string]Variable`](#variable) | | A set of variables that can be used in the task. |
132
+
| `env` | [`map[string]Variable`](#variable) | | A set of environment variables that will be made available to shell commands. |
133
+
| `silent` | `bool` | `false` | 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. |
134
+
| `interactive` | `bool` | `false` | Tells task that the command is interactive. |
135
+
| `internal` | `bool` | `false` | Stops a task from being callable on the command line. It will also be omitted from the output when used with `--list`. |
136
+
| `method` | `string` | `checksum` | 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. |
137
+
| `prefix` | `string` | | Defines a string to prefix the output of tasks running in parallel. Only used when the output mode is `prefixed`. |
138
+
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing commands. |
128
139
| `run` | `string` | The one declared globally in the Taskfile or `always` | Specifies whether the task should run again or not if called more than once. Available options: `always`, `once` and `when_changed`. |
129
-
| `prefix` | `string` | | Allows to override the prefix print before the STDOUT. Only relevant when using the `prefixed` output mode. |
130
-
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing the commands. |
131
-
| `generates` | `[]string` | | List of files meant to be generated by this task. Relevant for `timestamp` method. Can be file paths or star globs. |
132
-
| `status` | `[]string` | | List of commands to check if this task should run. The task is skipped otherwise. This overrides `method`, `sources` and `generates`. |
133
-
| `preconditions` | [`[]Precondition`](#precondition) | | List of commands to check if this task should run. The task errors otherwise. |
| `deps` | [`[]Dependency`](#dependency) | | List of dependencies of this task. |
137
-
| `cmds` | [`[]Command`](#command) | | List of commands to be executed. |
138
140
139
141
:::info
140
142
@@ -180,11 +182,11 @@ tasks:
180
182
| Attribute | Type | Default | Description |
181
183
| - | - | - | - |
182
184
| `cmd` | `string` | | The shell command to be executed. |
183
-
| `defer` | `string` | | Alternative to `cmd`, but schedules the command to be executed at the end of this task instead of immediately. This cannot be used together with `cmd`. |
184
185
| `silent` | `bool` | `false` | Skips some output for this command. Note that STDOUT and STDERR of the commands will still be redirected. |
185
-
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing the command. |
186
186
| `task` | `string` | | Set this to trigger execution of another task instead of running a command. This cannot be set together with `cmd`. |
187
187
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to the referenced task. Only relevant when setting `task` instead of `cmd`. |
188
+
| `ignore_error` | `bool` | `false` | Continue execution if errors happen while executing the command. |
189
+
| `defer` | `string` | | Alternative to `cmd`, but schedules the command to be executed at the end of this task instead of immediately. This cannot be used together with `cmd`. |
0 commit comments