From ad12d84630b156bcc20a74eb575758a7ecb6c14d Mon Sep 17 00:00:00 2001 From: task-bot <106601941+task-bot@users.noreply.github.com> Date: Sat, 15 Apr 2023 21:00:36 +0000 Subject: [PATCH] deploy: 52e0b59548526412f015755abe94207a418aa285 --- 404.html | 4 ++-- api/index.html | 6 +++--- assets/js/f7fd502c.0ea634d6.js | 1 + assets/js/f7fd502c.cd06e683.js | 1 - .../{runtime~main.235ca56b.js => runtime~main.1f4c1dda.js} | 2 +- changelog/index.html | 4 ++-- community/index.html | 4 ++-- contributing/index.html | 4 ++-- donate/index.html | 4 ++-- faq/index.html | 4 ++-- index.html | 4 ++-- installation/index.html | 4 ++-- releasing/index.html | 4 ++-- search/index.html | 4 ++-- styleguide/index.html | 4 ++-- taskfile-versions/index.html | 4 ++-- translate/index.html | 4 ++-- usage/index.html | 4 ++-- 18 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 assets/js/f7fd502c.0ea634d6.js delete mode 100644 assets/js/f7fd502c.cd06e683.js rename assets/js/{runtime~main.235ca56b.js => runtime~main.1f4c1dda.js} (98%) diff --git a/404.html b/404.html index 0bc44f53..457acdbd 100644 --- a/404.html +++ b/404.html @@ -10,13 +10,13 @@ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/api/index.html b/api/index.html index 33c11c9f..a9e3620f 100644 --- a/api/index.html +++ b/api/index.html @@ -10,20 +10,20 @@ - +
Skip to main content

API Reference

CLI

Task command line tool has the following syntax:

task [--flags] [tasks...] [-- CLI_ARGS...]
tip

If -- is given, all remaning arguments will be assigned to a special -CLI_ARGS variable

ShortFlagTypeDefaultDescription
-c--colorbooltrueColored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable.
-C--concurrencyint0Limit number tasks to run concurrently. Zero means unlimited.
-d--dirstringWorking directorySets directory of execution.
-n--dryboolfalseCompiles and prints tasks in the order that they would be run, without executing them.
-x--exit-codeboolfalsePass-through the exit code of the task command.
-f--forceboolfalseForces execution even when the task is up-to-date.
-g--globalboolfalseRuns global Taskfile, from $HOME/Taskfile.{yml,yaml}.
-h--helpboolfalseShows Task usage.
-i--initboolfalseCreates a new Taskfile.yml in the current folder.
-I--intervalstring5sSets a different watch interval when using --watch, the default being 5 seconds. This string should be a valid Go Duration.
-l--listboolfalseLists tasks with description of current Taskfile.
-a--list-allboolfalseLists tasks with or without a description.
--sortstringdefaultChanges the order of the tasks when listed.
--jsonboolfalseSee JSON Output
-o--outputstringDefault set in the Taskfile or intervealedSets output style: [interleaved/group/prefixed].
--output-group-beginstringMessage template to print before a task's grouped output.
--output-group-endstringMessage template to print after a task's grouped output.
--output-group-error-onlyboolfalseSwallow command output on zero exit code.
-p--parallelboolfalseExecutes tasks provided on command line in parallel.
-s--silentboolfalseDisables echoing.
--statusboolfalseExits with non-zero exit code if any of the given tasks is not up-to-date.
--summaryboolfalseShow summary about a task.
-t--taskfilestringTaskfile.yml or Taskfile.yaml
-v--verboseboolfalseEnables verbose mode.
--versionboolfalseShow Task version.
-w--watchboolfalseEnables watch of the given task.

Exit Codes

Task will sometimes exit with specific exit codes. These codes are split into three groups with the following ranges:

  • General errors (0-99)
  • Taskfile errors (100-199)
  • Task errors (200-299)

A full list of the exit codes and their descriptions can be found below:

CodeDescription
0Success
1An unknown error occurred
100No Taskfile was found
101A Taskfile already exists when trying to initialize one
102The Taskfile is invalid or cannot be parsed
200The specified task could not be found
201An error occurred while executing a command inside of a task
202The user tried to invoke a task that is internal
203There a multiple tasks with the same name or alias
204A task was called too many times

These codes can also be found in the repository in errors/errors.go.

info

When Task is run with the -x/--exit-code flag, the exit code of any failed commands will be passed through to the user instead.

JSON Output

When using the --json flag in combination with either the --list or +CLI_ARGS variable

ShortFlagTypeDefaultDescription
-c--colorbooltrueColored output. Enabled by default. Set flag to false or use NO_COLOR=1 to disable.
-C--concurrencyint0Limit number tasks to run concurrently. Zero means unlimited.
-d--dirstringWorking directorySets directory of execution.
-n--dryboolfalseCompiles and prints tasks in the order that they would be run, without executing them.
-x--exit-codeboolfalsePass-through the exit code of the task command.
-f--forceboolfalseForces execution even when the task is up-to-date.
-g--globalboolfalseRuns global Taskfile, from $HOME/Taskfile.{yml,yaml}.
-h--helpboolfalseShows Task usage.
-i--initboolfalseCreates a new Taskfile.yml in the current folder.
-I--intervalstring5sSets a different watch interval when using --watch, the default being 5 seconds. This string should be a valid Go Duration.
-l--listboolfalseLists tasks with description of current Taskfile.
-a--list-allboolfalseLists tasks with or without a description.
--sortstringdefaultChanges the order of the tasks when listed.
--jsonboolfalseSee JSON Output
-o--outputstringDefault set in the Taskfile or intervealedSets output style: [interleaved/group/prefixed].
--output-group-beginstringMessage template to print before a task's grouped output.
--output-group-endstringMessage template to print after a task's grouped output.
--output-group-error-onlyboolfalseSwallow command output on zero exit code.
-p--parallelboolfalseExecutes tasks provided on command line in parallel.
-s--silentboolfalseDisables echoing.
--statusboolfalseExits with non-zero exit code if any of the given tasks is not up-to-date.
--summaryboolfalseShow summary about a task.
-t--taskfilestringTaskfile.yml or Taskfile.yaml
-v--verboseboolfalseEnables verbose mode.
--versionboolfalseShow Task version.
-w--watchboolfalseEnables watch of the given task.

Exit Codes

Task will sometimes exit with specific exit codes. These codes are split into three groups with the following ranges:

  • General errors (0-99)
  • Taskfile errors (100-199)
  • Task errors (200-299)

A full list of the exit codes and their descriptions can be found below:

CodeDescription
0Success
1An unknown error occurred
100No Taskfile was found
101A Taskfile already exists when trying to initialize one
102The Taskfile is invalid or cannot be parsed
200The specified task could not be found
201An error occurred while executing a command inside of a task
202The user tried to invoke a task that is internal
203There a multiple tasks with the same name or alias
204A task was called too many times

These codes can also be found in the repository in errors/errors.go.

info

When Task is run with the -x/--exit-code flag, the exit code of any failed commands will be passed through to the user instead.

JSON Output

When using the --json flag in combination with either the --list or --list-all flags, the output will be a JSON object with the following structure:

{
"tasks": [
{
"name": "",
"desc": "",
"summary": "",
"up_to_date": false,
"location": {
"line": 54,
"column": 3,
"taskfile": "/path/to/Taskfile.yml"
}
}
// ...
],
"location": "/path/to/Taskfile.yml"
}

Special Variables

There are some special variables that is available on the templating system:

VarDescription
CLI_ARGSContain all extra arguments passed after -- when calling Task through the CLI.
TASKThe name of the current task.
ROOT_DIRThe absolute path of the root Taskfile.
TASKFILE_DIRThe absolute path of the included Taskfile.
USER_WORKING_DIRThe absolute path of the directory task was called from.
CHECKSUMThe checksum of the files listed in sources. Only available within the status prop and if method is set to checksum.
TIMESTAMPThe date object of the greatest timestamp of the files listes in sources. Only available within the status prop and if method is set to timestamp.
TASK_VERSIONThe current version of task.

ENV

Some environment variables can be overriden to adjust Task behavior.

ENVDefaultDescription
TASK_TEMP_DIR.taskLocation of the temp dir. Can relative to the project like tmp/task or absolute like /tmp/.task or ~/.task.
TASK_COLOR_RESET0Color used for white.
TASK_COLOR_BLUE34Color used for blue.
TASK_COLOR_GREEN32Color used for green.
TASK_COLOR_CYAN36Color used for cyan.
TASK_COLOR_YELLOW33Color used for yellow.
TASK_COLOR_MAGENTA35Color used for magenta.
TASK_COLOR_RED31Color used for red.
FORCE_COLORForce color output usage.

Taskfile Schema

AttributeTypeDefaultDescription
versionstringVersion of the Taskfile. The current version is 3.
outputstringinterleavedOutput mode. Available options: interleaved, group and prefixed.
methodstringchecksumDefault method in this Taskfile. Can be overriden in a task by task basis. Available options: checksum, timestamp and none.
includesmap[string]IncludeAdditional Taskfiles to be included.
varsmap[string]VariableA set of global variables.
envmap[string]VariableA set of global environment variables.
tasksmap[string]TaskA set of task definitions.
silentboolfalseDefault 'silent' options for this Taskfile. If false, can be overidden with true in a task by task basis.
dotenv[]stringA list of .env file paths to be parsed.
runstringalwaysDefault 'run' option for this Taskfile. Available options: always, once and when_changed.
intervalstring5sSets a different watch interval when using --watch, the default being 5 seconds. This string should be a valid Go Duration.
set[]stringSpecify options for the set builtin.
shopt[]stringSpecify option for the shopt builtin.

Include

AttributeTypeDefaultDescription
taskfilestringThe 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.
dirstringThe parent Taskfile directoryThe working directory of the included tasks when run.
optionalboolfalseIf true, no errors will be thrown if the specified file does not exist.
internalboolfalseStops 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.
aliases[]stringAlternative names for the namespace of the included Taskfile.
varsmap[string]VariableA set of variables to apply to the included Taskfile.
info

Informing only a string like below is equivalent to setting that value to the taskfile attribute.

includes:
foo: ./path

Variable

AttributeTypeDefaultDescription
itselfstringA static value that will be set to the variable.
shstringA shell command. The output (STDOUT) will be assigned to the variable.
info

Static and dynamic variables have different syntaxes, like below:

vars:
STATIC: static
DYNAMIC:
sh: echo "dynamic"

Task

AttributeTypeDefaultDescription
cmds[]CommandA list of shell commands to be executed.
deps[]DependencyA list of dependencies of this task. Tasks defined here will run in parallel before this task.
labelstringOverrides the name of the task in the output when a task is run. Supports variables.
descstringA short description of the task. This is displayed when calling task --list.
summarystringA longer description of the task. This is displayed when calling task --summary [task].
aliases[]stringA list of alternative names by which the task can be called.
sources[]stringA list of sources to check before running this task. Relevant for checksum and timestamp methods. Can be file paths or star globs.
generates[]stringA list of files meant to be generated by this task. Relevant for timestamp method. Can be file paths or star globs.
status[]stringA list of commands to check if this task should run. The task is skipped otherwise. This overrides method, sources and generates.
preconditions[]PreconditionA list of commands to check if this task should run. If a condition is not met, the task will error.
dirstringThe directory in which this task should run. Defaults to the current working directory.
varsmap[string]VariableA set of variables that can be used in the task.
envmap[string]VariableA set of environment variables that will be made available to shell commands.
dotenv[]stringA list of .env file paths to be parsed.
silentboolfalseHides 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.
interactiveboolfalseTells task that the command is interactive.
internalboolfalseStops a task from being callable on the command line. It will also be omitted from the output when used with --list.
methodstringchecksumDefines 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.
prefixstringDefines a string to prefix the output of tasks running in parallel. Only used when the output mode is prefixed.
ignore_errorboolfalseContinue execution if errors happen while executing commands.
runstringThe one declared globally in the Taskfile or alwaysSpecifies whether the task should run again or not if called more than once. Available options: always, once and when_changed.
platforms[]stringAll platformsSpecifies which platforms the task should be run on. Valid GOOS and GOARCH values allowed. Task will be skipped otherwise.
set[]stringSpecify options for the set builtin.
shopt[]stringSpecify option for the shopt builtin.
info

These alternative syntaxes are available. They will set the given values to cmds and everything else will be set to their default values:

tasks:
foo: echo "foo"

foobar:
- echo "foo"
- echo "bar"

baz:
cmd: echo "baz"

Command

AttributeTypeDefaultDescription
cmdstringThe shell command to be executed.
silentboolfalseSkips some output for this command. Note that STDOUT and STDERR of the commands will still be redirected.
taskstringSet this to trigger execution of another task instead of running a command. This cannot be set together with cmd.
varsmap[string]VariableOptional additional variables to be passed to the referenced task. Only relevant when setting task instead of cmd.
ignore_errorboolfalseContinue execution if errors happen while executing the command.
deferstringAlternative 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.
platforms[]stringAll platformsSpecifies which platforms the command should be run on. Valid GOOS and GOARCH values allowed. Command will be skipped otherwise.
set[]stringSpecify options for the set builtin.
shopt[]stringSpecify option for the shopt builtin.
info

If given as a a string, the value will be assigned to cmd:

tasks:
foo:
cmds:
- echo "foo"
- echo "bar"

Dependency

AttributeTypeDefaultDescription
taskstringThe task to be execute as a dependency.
varsmap[string]VariableOptional additional variables to be passed to this task.
tip

If you don't want to set additional variables, it's enough to declare the dependency as a list of strings (they will be assigned to task):

tasks:
foo:
deps: [foo, bar]

Precondition

AttributeTypeDefaultDescription
shstringCommand to be executed. If a non-zero exit code is returned, the task errors without executing its commands.
msgstringOptional message to print if the precondition isn't met.
tip

If you don't want to set a different message, you can declare a precondition like this and the value will be assigned to sh:

tasks:
foo:
precondition: test -f Taskfile.yml
- + \ No newline at end of file diff --git a/assets/js/f7fd502c.0ea634d6.js b/assets/js/f7fd502c.0ea634d6.js new file mode 100644 index 00000000..a080b17e --- /dev/null +++ b/assets/js/f7fd502c.0ea634d6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[582],{3905:function(t,e,n){n.d(e,{Zo:function(){return m},kt:function(){return s}});var a=n(7294);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function i(t){for(var e=1;e=0||(l[n]=t[n]);return l}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(l[n]=t[n])}return l}var p=a.createContext({}),o=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):i(i({},e),t)),n},m=function(t){var e=o(t.components);return a.createElement(p.Provider,{value:e},t.children)},k="mdxType",N={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},u=a.forwardRef((function(t,e){var n=t.components,l=t.mdxType,r=t.originalType,p=t.parentName,m=d(t,["components","mdxType","originalType","parentName"]),k=o(n),u=l,s=k["".concat(p,".").concat(u)]||k[u]||N[u]||r;return n?a.createElement(s,i(i({ref:e},m),{},{components:n})):a.createElement(s,i({ref:e},m))}));function s(t,e){var n=arguments,l=e&&e.mdxType;if("string"==typeof t||l){var r=n.length,i=new Array(r);i[0]=u;var d={};for(var p in e)hasOwnProperty.call(e,p)&&(d[p]=e[p]);d.originalType=t,d[k]="string"==typeof t?t:l,i[1]=d;for(var o=2;o=0||(l[n]=t[n]);return l}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(l[n]=t[n])}return l}var p=a.createContext({}),o=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):i(i({},e),t)),n},m=function(t){var e=o(t.components);return a.createElement(p.Provider,{value:e},t.children)},k="mdxType",N={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},u=a.forwardRef((function(t,e){var n=t.components,l=t.mdxType,r=t.originalType,p=t.parentName,m=d(t,["components","mdxType","originalType","parentName"]),k=o(n),u=l,s=k["".concat(p,".").concat(u)]||k[u]||N[u]||r;return n?a.createElement(s,i(i({ref:e},m),{},{components:n})):a.createElement(s,i({ref:e},m))}));function s(t,e){var n=arguments,l=e&&e.mdxType;if("string"==typeof t||l){var r=n.length,i=new Array(r);i[0]=u;var d={};for(var p in e)hasOwnProperty.call(e,p)&&(d[p]=e[p]);d.originalType=t,d[k]="string"==typeof t?t:l,i[1]=d;for(var o=2;o=o)&&Object.keys(i.O).every((function(e){return i.O[e](n[a])}))?n.splice(a--,1):(u=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var f={};t=t||[null,n({}),n([]),n(n)];for(var u=2&r&&e;"object"==typeof u&&!~t.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},i.d(o,f),o},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return"assets/js/"+({34:"9beb87c2",53:"935f2afb",80:"4d54d076",133:"f1d66b0d",217:"3b8c55ea",252:"02371786",514:"1be78505",552:"0afd354a",582:"f7fd502c",595:"d0766b26",648:"3c140c84",671:"0e384e19",705:"7d415946",713:"1c56b476",827:"6476eba6",836:"0480b142",880:"5ef0e9d6",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{34:"633fe3d7",53:"9bf38336",80:"883076b5",133:"6862b446",217:"54a24181",252:"9481901e",514:"9062895a",552:"fb40b428",582:"cd06e683",595:"c5627647",648:"b629b889",671:"47884a35",705:"e8e607ed",713:"7edac691",780:"b979b06f",827:"e90c30d8",836:"098568bb",880:"c84c8b58",894:"4bf7d380",918:"e75765f6",920:"a9132d06",945:"3694633c",972:"01a5a892"}[e]+".js"},i.miniCssF=function(e){},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="taskfile-dev:",i.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var u,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d=o)&&Object.keys(i.O).every((function(e){return i.O[e](n[a])}))?n.splice(a--,1):(u=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var f={};t=t||[null,n({}),n([]),n(n)];for(var u=2&r&&e;"object"==typeof u&&!~t.indexOf(u);u=n(u))Object.getOwnPropertyNames(u).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},i.d(o,f),o},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return"assets/js/"+({34:"9beb87c2",53:"935f2afb",80:"4d54d076",133:"f1d66b0d",217:"3b8c55ea",252:"02371786",514:"1be78505",552:"0afd354a",582:"f7fd502c",595:"d0766b26",648:"3c140c84",671:"0e384e19",705:"7d415946",713:"1c56b476",827:"6476eba6",836:"0480b142",880:"5ef0e9d6",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{34:"633fe3d7",53:"9bf38336",80:"883076b5",133:"6862b446",217:"54a24181",252:"9481901e",514:"9062895a",552:"fb40b428",582:"0ea634d6",595:"c5627647",648:"b629b889",671:"47884a35",705:"e8e607ed",713:"7edac691",780:"b979b06f",827:"e90c30d8",836:"098568bb",880:"c84c8b58",894:"4bf7d380",918:"e75765f6",920:"a9132d06",945:"3694633c",972:"01a5a892"}[e]+".js"},i.miniCssF=function(e){},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="taskfile-dev:",i.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var u,a;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d