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). |
85
+
|`includes`|[`map[string]Include`](#include)|| Additional Taskfiles to be included. |
89
86
|`vars`|[`map[string]Variable`](#variable)|| Global variables. |
90
87
|`env`|[`map[string]Variable`](#variable)|| Global environment. |
91
-
|`dotenv`|`[]string`|| A list of `.env` file paths to be parsed. |
92
88
|`tasks`|[`map[string]Task`](#task)|| The 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. |
90
+
|`dotenv`|`[]string`|| A list of `.env` file paths to be parsed. |
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 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. |
"description": "Environment variables for this task",
42
-
"$ref": "#/definitions/3/env"
43
-
},
44
-
"desc": {
45
-
"description": "Provides a description for this task. Used by the --list/-l flag",
46
-
"type": "string"
47
-
},
48
-
"summary": {
49
-
"description": "Provides a summary for this task. Used by the --summary flag",
50
-
"type": "string"
51
-
},
52
-
"vars": {
53
-
"description": "Declare variables for this task",
54
-
"$ref": "#/definitions/3/vars"
55
-
},
56
-
"label": {
57
-
"type": "string",
58
-
"description": "Override the task name print on summary, can be interpolated with variables"
59
-
},
60
-
"run": {
61
-
"description": "Controls whether or not this task runs when called by multiple deps or cmds.",
62
-
"$ref": "#/definitions/3/run"
63
-
},
64
42
"cmds": {
65
-
"description": "A list of commands for this task",
43
+
"description": "A list of commands to be executed.",
66
44
"$ref": "#/definitions/3/cmds"
67
45
},
68
-
"dir": {
69
-
"description": "Defines where the task will run. Defaults to the directory of the Taskfile",
70
-
"type": "string"
71
-
},
72
46
"deps": {
73
-
"description": "Declaring tasks here that should run automatically before this task",
47
+
"description": "A list of dependencies of this task. Tasks defined here will run in parallel before this task.",
74
48
"type": "array",
75
49
"items": {
76
50
"oneOf": [
@@ -83,59 +57,97 @@
83
57
]
84
58
}
85
59
},
60
+
"label": {
61
+
"description": "Overrides the name of the task in the output when a task is run. Supports variables.",
62
+
"type": "string"
63
+
},
64
+
"desc": {
65
+
"description": "A short description of the task. This is displayed when calling `task --list`.",
66
+
"type": "string"
67
+
},
68
+
"summary": {
69
+
"description": "A longer description of the task. This is displayed when calling `task --summary [task]`.",
70
+
"type": "string"
71
+
},
72
+
"aliases": {
73
+
"description": "A list of alternative names by which the task can be called.",
74
+
"type": "array",
75
+
"items": {
76
+
"type": "string"
77
+
}
78
+
},
86
79
"sources": {
87
-
"description": "List the source files for this task. Will be used to prevent running the task again if nothing changed. Can be a file of a file pattern.",
80
+
"description": "A list of sources to check before running this task. Relevant for `checksum` and `timestamp` methods. Can be file paths or star globs.",
88
81
"type": "array",
89
82
"items": {
90
83
"type": "string"
91
84
}
92
85
},
93
86
"generates": {
94
-
"description": "List the files generated by this task. Will be used to prevent running the task again if nothing changed. Can be a file of a file pattern.",
87
+
"description": "A list of files meant to be generated by this task. Relevant for `timestamp` method. Can be file paths or star globs.",
95
88
"type": "array",
96
89
"items": {
97
90
"type": "string"
98
91
}
99
92
},
100
93
"status": {
101
-
"description": "Define a sequence of tests as status of this task. If no error is returned (exit status 0), the task is considered up-to-date",
94
+
"description": "A list of commands to check if this task should run. The task is skipped otherwise. This overrides `method`, `sources` and `generates`.",
102
95
"type": "array",
103
96
"items": {
104
97
"type": "string"
105
98
}
106
99
},
107
-
"method": {
108
-
"description": "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 will probably want to ignore the .task folder in your .gitignore file). none skips any validation and always run the task",
109
-
"type": "string",
110
-
"enum": [ "none", "checksum", "timestamp" ],
111
-
"default": "none"
100
+
"preconditions": {
101
+
"description": "A list of commands to check if this task should run. If a condition is not met, the task will error.",
102
+
"type": "array",
103
+
"items": {
104
+
"$ref": "#/definitions/3/precondition"
105
+
}
112
106
},
113
-
"internal": {
114
-
"description": "Indicates that the task cannot be called directly by the user",
115
-
"type": "boolean"
107
+
"dir": {
108
+
"description": "The directory in which this task should run. Defaults to the current working directory.",
109
+
"type": "string"
110
+
},
111
+
"vars": {
112
+
"description": "A set of variables that can be used in the task.",
113
+
"$ref": "#/definitions/3/vars"
114
+
},
115
+
"env": {
116
+
"description": "A set of environment variables that will be made available to shell commands.",
117
+
"$ref": "#/definitions/3/env"
116
118
},
117
119
"silent": {
118
-
"description": "Silent mode disables echoing of commands before Task runs it",
119
-
"type": "boolean"
120
+
"description": "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.",
121
+
"type": "boolean",
122
+
"default": false
120
123
},
121
-
"ignore_error": {
122
-
"description": "Prevent Task from aborting the execution of tasks even after receiving a status code of 1",
123
-
"type": "boolean"
124
+
"interactive": {
125
+
"description": "Tells task that the command is interactive.",
126
+
"type": "boolean",
127
+
"default": false
128
+
},
129
+
"internal": {
130
+
"description": "Stops a task from being callable on the command line. It will also be omitted from the output when used with `--list`.",
131
+
"type": "boolean",
132
+
"default": false
133
+
},
134
+
"method": {
135
+
"description": "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.",
136
+
"type": "string",
137
+
"enum": [ "none", "checksum", "timestamp" ],
138
+
"default": "none"
124
139
},
125
140
"prefix": {
126
-
"description": "Defines a string to prefix the output of tasks running in parallel. Only used when the output mode is prefix",
141
+
"description": "Defines a string to prefix the output of tasks running in parallel. Only used when the output mode is `prefixed`.",
127
142
"type": "string"
128
143
},
129
-
"preconditions": {
130
-
"description": "Defines a list of conditions to be true for the task to run",
131
-
"type": "array",
132
-
"items": {
133
-
"$ref": "#/definitions/3/precondition"
134
-
}
135
-
},
136
-
"interactive": {
137
-
"description": "Indicates that this task runs an interactive CLI application",
144
+
"ignore_error": {
145
+
"description": "Continue execution if errors happen while executing commands.",
138
146
"type": "boolean"
147
+
},
148
+
"run": {
149
+
"description": "Specifies whether the task should run again or not if called more than once. Available options: `always`, `once` and `when_changed`.",
150
+
"$ref": "#/definitions/3/run"
139
151
}
140
152
}
141
153
},
@@ -244,7 +256,6 @@
244
256
}
245
257
}
246
258
},
247
-
"description": "JSON Schema for Taskfile files.",
248
259
"oneOf": [
249
260
{
250
261
"type": "object",
@@ -291,6 +302,25 @@
291
302
"dir": {
292
303
"description": "On which directory the included Taskfile will run",
293
304
"type": "string"
305
+
},
306
+
"optional": {
307
+
"description": "If `true`, no errors will be thrown if the specified file does not exist.",
308
+
"type": "boolean"
309
+
},
310
+
"internal": {
311
+
"description": "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`.",
312
+
"type": "boolean"
313
+
},
314
+
"aliases": {
315
+
"description": "Alternative names for the namespace of the included Taskfile.",
316
+
"type": "array",
317
+
"items": {
318
+
"type": "string"
319
+
}
320
+
},
321
+
"vars": {
322
+
"description": "A set of variables to apply to the included Taskfile.",
0 commit comments