From b5ea9c8468935fb5e378c506ee9d57180c161aae Mon Sep 17 00:00:00 2001 From: task-bot <106601941+task-bot@users.noreply.github.com> Date: Thu, 25 May 2023 16:17:04 +0000 Subject: [PATCH] deploy: 31bbb47162aeabdebbf577d93286ee6747a2c5fa --- 404.html | 4 ++-- api/index.html | 4 ++-- assets/js/{0afd354a.e4c81bb7.js => 0afd354a.157e2f08.js} | 2 +- .../{runtime~main.79de2bda.js => runtime~main.d97cb3e4.js} | 2 +- changelog/index.html | 4 ++-- community/index.html | 4 ++-- contributing/index.html | 4 ++-- donate/index.html | 4 ++-- faq/index.html | 4 ++-- fr-FR/404.html | 6 +++--- fr-FR/api/index.html | 6 +++--- fr-FR/assets/js/main.7594086f.js | 2 ++ ...f088ca8c.js.LICENSE.txt => main.7594086f.js.LICENSE.txt} | 0 fr-FR/changelog/index.html | 6 +++--- fr-FR/community/index.html | 6 +++--- fr-FR/contributing/index.html | 6 +++--- fr-FR/donate/index.html | 6 +++--- fr-FR/faq/index.html | 6 +++--- fr-FR/index.html | 6 +++--- fr-FR/installation/index.html | 6 +++--- fr-FR/integrations/index.html | 6 +++--- fr-FR/releasing/index.html | 6 +++--- fr-FR/search/index.html | 6 +++--- fr-FR/styleguide/index.html | 6 +++--- fr-FR/taskfile-versions/index.html | 6 +++--- fr-FR/translate/index.html | 6 +++--- fr-FR/usage/index.html | 6 +++--- index.html | 4 ++-- installation/index.html | 4 ++-- integrations/index.html | 4 ++-- pt-BR/404.html | 6 +++--- pt-BR/api/index.html | 6 +++--- pt-BR/assets/js/main.91bbb855.js | 2 -- pt-BR/assets/js/main.d42b2e46.js | 2 ++ ...91bbb855.js.LICENSE.txt => main.d42b2e46.js.LICENSE.txt} | 0 pt-BR/changelog/index.html | 6 +++--- pt-BR/community/index.html | 6 +++--- pt-BR/contributing/index.html | 6 +++--- pt-BR/donate/index.html | 6 +++--- pt-BR/faq/index.html | 6 +++--- pt-BR/index.html | 6 +++--- pt-BR/installation/index.html | 6 +++--- pt-BR/integrations/index.html | 6 +++--- pt-BR/releasing/index.html | 6 +++--- pt-BR/search/index.html | 6 +++--- pt-BR/styleguide/index.html | 6 +++--- pt-BR/taskfile-versions/index.html | 6 +++--- pt-BR/translate/index.html | 6 +++--- pt-BR/usage/index.html | 6 +++--- releasing/index.html | 4 ++-- ru-RU/404.html | 6 +++--- ru-RU/api/index.html | 6 +++--- .../js/main.abc7776b.js => ru-RU/assets/js/main.652a56e0.js | 4 ++-- ...ee4c8309.js.LICENSE.txt => main.652a56e0.js.LICENSE.txt} | 0 ru-RU/assets/js/main.ee4c8309.js | 2 -- ru-RU/changelog/index.html | 6 +++--- ru-RU/community/index.html | 6 +++--- ru-RU/contributing/index.html | 6 +++--- ru-RU/donate/index.html | 6 +++--- ru-RU/faq/index.html | 6 +++--- ru-RU/index.html | 6 +++--- ru-RU/installation/index.html | 6 +++--- ru-RU/integrations/index.html | 6 +++--- ru-RU/releasing/index.html | 6 +++--- ru-RU/search/index.html | 6 +++--- ru-RU/styleguide/index.html | 6 +++--- ru-RU/taskfile-versions/index.html | 6 +++--- ru-RU/translate/index.html | 6 +++--- ru-RU/usage/index.html | 6 +++--- search/index.html | 4 ++-- styleguide/index.html | 4 ++-- taskfile-versions/index.html | 6 +++--- translate/index.html | 4 ++-- usage/index.html | 4 ++-- zh-Hans/404.html | 6 +++--- zh-Hans/api/index.html | 6 +++--- .../main.f088ca8c.js => zh-Hans/assets/js/main.dbdd6e70.js | 4 ++-- ...abc7776b.js.LICENSE.txt => main.dbdd6e70.js.LICENSE.txt} | 0 zh-Hans/changelog/index.html | 6 +++--- zh-Hans/community/index.html | 6 +++--- zh-Hans/contributing/index.html | 6 +++--- zh-Hans/donate/index.html | 6 +++--- zh-Hans/faq/index.html | 6 +++--- zh-Hans/index.html | 6 +++--- zh-Hans/installation/index.html | 6 +++--- zh-Hans/integrations/index.html | 6 +++--- zh-Hans/releasing/index.html | 6 +++--- zh-Hans/search/index.html | 6 +++--- zh-Hans/styleguide/index.html | 6 +++--- zh-Hans/taskfile-versions/index.html | 6 +++--- zh-Hans/translate/index.html | 6 +++--- zh-Hans/usage/index.html | 6 +++--- 92 files changed, 235 insertions(+), 235 deletions(-) rename assets/js/{0afd354a.e4c81bb7.js => 0afd354a.157e2f08.js} (96%) rename assets/js/{runtime~main.79de2bda.js => runtime~main.d97cb3e4.js} (83%) create mode 100644 fr-FR/assets/js/main.7594086f.js rename fr-FR/assets/js/{main.f088ca8c.js.LICENSE.txt => main.7594086f.js.LICENSE.txt} (100%) delete mode 100644 pt-BR/assets/js/main.91bbb855.js create mode 100644 pt-BR/assets/js/main.d42b2e46.js rename pt-BR/assets/js/{main.91bbb855.js.LICENSE.txt => main.d42b2e46.js.LICENSE.txt} (100%) rename zh-Hans/assets/js/main.abc7776b.js => ru-RU/assets/js/main.652a56e0.js (83%) rename ru-RU/assets/js/{main.ee4c8309.js.LICENSE.txt => main.652a56e0.js.LICENSE.txt} (100%) delete mode 100644 ru-RU/assets/js/main.ee4c8309.js rename fr-FR/assets/js/main.f088ca8c.js => zh-Hans/assets/js/main.dbdd6e70.js (81%) rename zh-Hans/assets/js/{main.abc7776b.js.LICENSE.txt => main.dbdd6e70.js.LICENSE.txt} (100%) diff --git a/404.html b/404.html index 9805e3b2..77bf33c2 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 510908d4..9d0123b8 100644 --- a/api/index.html +++ b/api/index.html @@ -10,7 +10,7 @@ - + @@ -23,7 +23,7 @@ structure:

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.
silentboolfalseHides task name and command from output. The command's output will still be redirected to STDOUT and STDERR.
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/0afd354a.e4c81bb7.js b/assets/js/0afd354a.157e2f08.js similarity index 96% rename from assets/js/0afd354a.e4c81bb7.js rename to assets/js/0afd354a.157e2f08.js index 0386c894..afdf49ad 100644 --- a/assets/js/0afd354a.e4c81bb7.js +++ b/assets/js/0afd354a.157e2f08.js @@ -1 +1 @@ -"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[552],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},k=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),c=p(t),k=r,m=c["".concat(s,".").concat(k)]||c[k]||d[k]||l;return t?a.createElement(m,i(i({ref:n},u),{},{components:t})):a.createElement(m,i({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,i=new Array(l);i[0]=k;var o={};for(var s in n)hasOwnProperty.call(n,s)&&(o[s]=n[s]);o.originalType=e,o[c]="string"==typeof e?e:r,i[1]=o;for(var p=2;p= v3.0.0 anymore.")),(0,r.kt)("p",null,"In the first version of the ",(0,r.kt)("inlineCode",{parentName:"p"},"Taskfile"),", the ",(0,r.kt)("inlineCode",{parentName:"p"},"version:")," key was not available,\nbecause the tasks was in the root of the YAML document. Like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'echo:\n cmds:\n - echo "Hello, World!"\n')),(0,r.kt)("p",null,"The variable priority order was also different:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Call variables"),(0,r.kt)("li",{parentName:"ol"},"Environment"),(0,r.kt)("li",{parentName:"ol"},"Task variables"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"Taskvars.yml")," variables")),(0,r.kt)("h2",{id:"version-20"},"Version 2.0"),(0,r.kt)("p",null,"At version 2, we introduced the ",(0,r.kt)("inlineCode",{parentName:"p"},"version:")," key, to allow us to evolve Task with\nnew features without breaking existing Taskfiles. The new syntax is as follows:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\ntasks:\n echo:\n cmds:\n - echo \"Hello, World!\"\n")),(0,r.kt)("p",null,"Version 2 allows you to write global variables directly in the Taskfile, if you\ndon't want to create a ",(0,r.kt)("inlineCode",{parentName:"p"},"Taskvars.yml"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nvars:\n GREETING: Hello, World!\n\ntasks:\n greet:\n cmds:\n - echo \"{{.GREETING}}\"\n")),(0,r.kt)("p",null,"The variable priority order changed to the following:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Task variables"),(0,r.kt)("li",{parentName:"ol"},"Call variables"),(0,r.kt)("li",{parentName:"ol"},"Taskfile variables"),(0,r.kt)("li",{parentName:"ol"},"Taskvars file variables"),(0,r.kt)("li",{parentName:"ol"},"Environment variables")),(0,r.kt)("p",null,"A new global option was added to configure the number of variables expansions\n(which default to 2):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nexpansions: 3\n\nvars:\n FOO: foo\n BAR: bar\n BAZ: baz\n FOOBAR: '{{.FOO}}{{.BAR}}'\n FOOBARBAZ: '{{.FOOBAR}}{{.BAZ}}'\n\ntasks:\n default:\n cmds:\n - echo \"{{.FOOBARBAZ}}\"\n")),(0,r.kt)("h2",{id:"version-21"},"Version 2.1"),(0,r.kt)("p",null,"Version 2.1 includes a global ",(0,r.kt)("inlineCode",{parentName:"p"},"output")," option, to allow having more control over\nhow commands output are printed to the console (see ",(0,r.kt)("a",{parentName:"p",href:"/usage/#output-syntax"},"documentation")," for\nmore info):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\noutput: prefixed\n\ntasks:\n server:\n cmds:\n - go run main.go\n prefix: server\n")),(0,r.kt)("p",null,"From this version it's also possible to ignore errors of a command or task\n(check documentation ",(0,r.kt)("a",{parentName:"p",href:"/usage/#ignore-errors"},"here"),"):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'2\'\n\ntasks:\n example-1:\n cmds:\n - cmd: exit 1\n ignore_error: true\n - echo "This will be print"\n\n example-2:\n cmds:\n - exit 1\n - echo "This will be print"\n ignore_error: true\n')),(0,r.kt)("h2",{id:"version-22"},"Version 2.2"),(0,r.kt)("p",null,"Version 2.2 comes with a global ",(0,r.kt)("inlineCode",{parentName:"p"},"includes")," options to include other Taskfiles:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nincludes:\n docs: ./documentation # will look for ./documentation/Taskfile.yml\n docker: ./DockerTasks.yml\n")),(0,r.kt)("h2",{id:"version-26"},"Version 2.6"),(0,r.kt)("p",null,"Version 2.6 comes with ",(0,r.kt)("inlineCode",{parentName:"p"},"preconditions")," stanza in tasks."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\ntasks:\n upload_environment:\n preconditions:\n - test -f .env\n cmds:\n - aws s3 cp .env s3://myenvironment\n")),(0,r.kt)("p",null,"Please check the ",(0,r.kt)("a",{parentName:"p",href:"/usage/#including-other-taskfiles"},"documentation")),(0,r.kt)("h2",{id:"version-3"},"Version 3"),(0,r.kt)("p",null,"These are some major changes done on ",(0,r.kt)("inlineCode",{parentName:"p"},"v3"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Task's output will now be colored"),(0,r.kt)("li",{parentName:"ul"},"Added support for ",(0,r.kt)("inlineCode",{parentName:"li"},".env")," like files"),(0,r.kt)("li",{parentName:"ul"},"Added ",(0,r.kt)("inlineCode",{parentName:"li"},"label:")," setting to task so one can override how the task name appear in\nthe logs"),(0,r.kt)("li",{parentName:"ul"},"A global ",(0,r.kt)("inlineCode",{parentName:"li"},"method:")," was added to allow setting the default method, and Task's\ndefault changed to ",(0,r.kt)("inlineCode",{parentName:"li"},"checksum")),(0,r.kt)("li",{parentName:"ul"},"Two magic variables were added when using ",(0,r.kt)("inlineCode",{parentName:"li"},"status:"),": ",(0,r.kt)("inlineCode",{parentName:"li"},"CHECKSUM")," and\n",(0,r.kt)("inlineCode",{parentName:"li"},"TIMESTAMP")," which contains, respectively, the md5 checksum and greatest\nmodification timestamp of the files listed on ",(0,r.kt)("inlineCode",{parentName:"li"},"sources:")),(0,r.kt)("li",{parentName:"ul"},"Also, the ",(0,r.kt)("inlineCode",{parentName:"li"},"TASK")," variable is always available with the current task name"),(0,r.kt)("li",{parentName:"ul"},"CLI variables are always treated as global variables"),(0,r.kt)("li",{parentName:"ul"},"Added ",(0,r.kt)("inlineCode",{parentName:"li"},"dir:")," option to ",(0,r.kt)("inlineCode",{parentName:"li"},"includes")," to allow choosing on which directory an\nincluded Taskfile will run:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"includes:\n docs:\n taskfile: ./docs\n dir: ./docs\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Implemented short task syntax. All below syntaxes are equivalent:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print:\n cmds:\n - echo \"Hello, World!\"\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print:\n - echo \"Hello, World!\"\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print: echo \"Hello, World!\"\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"There was a major refactor on how variables are handled. They're now easier to\nunderstand. The ",(0,r.kt)("inlineCode",{parentName:"li"},"expansions:")," setting was removed as it became unncessary.\nThis is the order in which Task will process variables, each level can see the\nvariables set by the previous one and override those.",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Environment variables"),(0,r.kt)("li",{parentName:"ul"},"Global + CLI variables"),(0,r.kt)("li",{parentName:"ul"},"Call variables"),(0,r.kt)("li",{parentName:"ul"},"Task variables")))))}c.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[552],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=a.createContext({}),p=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},k=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),c=p(t),k=r,m=c["".concat(s,".").concat(k)]||c[k]||d[k]||l;return t?a.createElement(m,i(i({ref:n},u),{},{components:t})):a.createElement(m,i({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,i=new Array(l);i[0]=k;var o={};for(var s in n)hasOwnProperty.call(n,s)&&(o[s]=n[s]);o.originalType=e,o[c]="string"==typeof e?e:r,i[1]=o;for(var p=2;p= v3.0.0 anymore.")),(0,r.kt)("p",null,"In the first version of the ",(0,r.kt)("inlineCode",{parentName:"p"},"Taskfile"),", the ",(0,r.kt)("inlineCode",{parentName:"p"},"version:")," key was not available,\nbecause the tasks was in the root of the YAML document. Like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'echo:\n cmds:\n - echo "Hello, World!"\n')),(0,r.kt)("p",null,"The variable priority order was also different:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Call variables"),(0,r.kt)("li",{parentName:"ol"},"Environment"),(0,r.kt)("li",{parentName:"ol"},"Task variables"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"Taskvars.yml")," variables")),(0,r.kt)("h2",{id:"version-20"},"Version 2.0"),(0,r.kt)("p",null,"At version 2, we introduced the ",(0,r.kt)("inlineCode",{parentName:"p"},"version:")," key, to allow us to evolve Task with\nnew features without breaking existing Taskfiles. The new syntax is as follows:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\ntasks:\n echo:\n cmds:\n - echo \"Hello, World!\"\n")),(0,r.kt)("p",null,"Version 2 allows you to write global variables directly in the Taskfile, if you\ndon't want to create a ",(0,r.kt)("inlineCode",{parentName:"p"},"Taskvars.yml"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nvars:\n GREETING: Hello, World!\n\ntasks:\n greet:\n cmds:\n - echo \"{{.GREETING}}\"\n")),(0,r.kt)("p",null,"The variable priority order changed to the following:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Task variables"),(0,r.kt)("li",{parentName:"ol"},"Call variables"),(0,r.kt)("li",{parentName:"ol"},"Taskfile variables"),(0,r.kt)("li",{parentName:"ol"},"Taskvars file variables"),(0,r.kt)("li",{parentName:"ol"},"Environment variables")),(0,r.kt)("p",null,"A new global option was added to configure the number of variables expansions\n(which default to 2):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nexpansions: 3\n\nvars:\n FOO: foo\n BAR: bar\n BAZ: baz\n FOOBAR: '{{.FOO}}{{.BAR}}'\n FOOBARBAZ: '{{.FOOBAR}}{{.BAZ}}'\n\ntasks:\n default:\n cmds:\n - echo \"{{.FOOBARBAZ}}\"\n")),(0,r.kt)("h2",{id:"version-21"},"Version 2.1"),(0,r.kt)("p",null,"Version 2.1 includes a global ",(0,r.kt)("inlineCode",{parentName:"p"},"output")," option, to allow having more control over\nhow commands output are printed to the console (see ",(0,r.kt)("a",{parentName:"p",href:"/usage/#output-syntax"},"documentation")," for\nmore info):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\noutput: prefixed\n\ntasks:\n server:\n cmds:\n - go run main.go\n prefix: server\n")),(0,r.kt)("p",null,"From this version it's also possible to ignore errors of a command or task\n(check documentation ",(0,r.kt)("a",{parentName:"p",href:"/usage/#ignore-errors"},"here"),"):"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'2\'\n\ntasks:\n example-1:\n cmds:\n - cmd: exit 1\n ignore_error: true\n - echo "This will be print"\n\n example-2:\n cmds:\n - exit 1\n - echo "This will be print"\n ignore_error: true\n')),(0,r.kt)("h2",{id:"version-22"},"Version 2.2"),(0,r.kt)("p",null,"Version 2.2 comes with a global ",(0,r.kt)("inlineCode",{parentName:"p"},"includes")," options to include other Taskfiles:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nincludes:\n docs: ./documentation # will look for ./documentation/Taskfile.yml\n docker: ./DockerTasks.yml\n")),(0,r.kt)("h2",{id:"version-26"},"Version 2.6"),(0,r.kt)("p",null,"Version 2.6 comes with ",(0,r.kt)("inlineCode",{parentName:"p"},"preconditions")," stanza in tasks."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\ntasks:\n upload_environment:\n preconditions:\n - test -f .env\n cmds:\n - aws s3 cp .env s3://myenvironment\n")),(0,r.kt)("p",null,"Please check the ",(0,r.kt)("a",{parentName:"p",href:"/usage/#including-other-taskfiles"},"documentation")),(0,r.kt)("h2",{id:"version-3"},"Version 3"),(0,r.kt)("p",null,"These are some major changes done on ",(0,r.kt)("inlineCode",{parentName:"p"},"v3"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Task's output will now be colored"),(0,r.kt)("li",{parentName:"ul"},"Added support for ",(0,r.kt)("inlineCode",{parentName:"li"},".env")," like files"),(0,r.kt)("li",{parentName:"ul"},"Added ",(0,r.kt)("inlineCode",{parentName:"li"},"label:")," setting to task so one can override how the task name appear in\nthe logs"),(0,r.kt)("li",{parentName:"ul"},"A global ",(0,r.kt)("inlineCode",{parentName:"li"},"method:")," was added to allow setting the default method, and Task's\ndefault changed to ",(0,r.kt)("inlineCode",{parentName:"li"},"checksum")),(0,r.kt)("li",{parentName:"ul"},"Two magic variables were added when using ",(0,r.kt)("inlineCode",{parentName:"li"},"status:"),": ",(0,r.kt)("inlineCode",{parentName:"li"},"CHECKSUM")," and\n",(0,r.kt)("inlineCode",{parentName:"li"},"TIMESTAMP")," which contains, respectively, the md5 checksum and greatest\nmodification timestamp of the files listed on ",(0,r.kt)("inlineCode",{parentName:"li"},"sources:")),(0,r.kt)("li",{parentName:"ul"},"Also, the ",(0,r.kt)("inlineCode",{parentName:"li"},"TASK")," variable is always available with the current task name"),(0,r.kt)("li",{parentName:"ul"},"CLI variables are always treated as global variables"),(0,r.kt)("li",{parentName:"ul"},"Added ",(0,r.kt)("inlineCode",{parentName:"li"},"dir:")," option to ",(0,r.kt)("inlineCode",{parentName:"li"},"includes")," to allow choosing on which directory an\nincluded Taskfile will run:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"includes:\n docs:\n taskfile: ./docs\n dir: ./docs\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Implemented short task syntax. All below syntaxes are equivalent:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print:\n cmds:\n - echo \"Hello, World!\"\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print:\n - echo \"Hello, World!\"\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print: echo \"Hello, World!\"\n")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"There was a major refactor on how variables are handled. They're now easier to\nunderstand. The ",(0,r.kt)("inlineCode",{parentName:"li"},"expansions:")," setting was removed as it became unnecessary.\nThis is the order in which Task will process variables, each level can see the\nvariables set by the previous one and override those.",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Environment variables"),(0,r.kt)("li",{parentName:"ul"},"Global + CLI variables"),(0,r.kt)("li",{parentName:"ul"},"Call variables"),(0,r.kt)("li",{parentName:"ul"},"Task variables")))))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.79de2bda.js b/assets/js/runtime~main.d97cb3e4.js similarity index 83% rename from assets/js/runtime~main.79de2bda.js rename to assets/js/runtime~main.d97cb3e4.js index d630de4a..c7256613 100644 --- a/assets/js/runtime~main.79de2bda.js +++ b/assets/js/runtime~main.d97cb3e4.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,f={},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,u),n.loaded=!0,n.exports}u.m=f,u.c=c,e=[],u.O=function(t,n,r,o){if(!n){var f=1/0;for(d=0;d=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[i])}))?n.splice(i--,1):(c=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},u.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);u.r(o);var f={};t=t||[null,n({}),n([]),n(n)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=n(c))Object.getOwnPropertyNames(c).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},u.d(o,f),o},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=function(e){return Promise.all(Object.keys(u.f).reduce((function(t,n){return u.f[n](e,t),t}),[]))},u.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",840:"fece9508",880:"5ef0e9d6",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{34:"56f62242",53:"37fa500e",80:"107551a6",133:"6862b446",217:"54a24181",252:"785d3a50",514:"9062895a",552:"e4c81bb7",582:"b03e9d37",595:"c5627647",648:"40860e03",671:"47884a35",705:"a781d43d",713:"eab54ff0",780:"b979b06f",827:"fa3f1cc9",836:"ba71a399",840:"3b88db36",880:"07fd3925",894:"4bf7d380",918:"e75765f6",920:"a9132d06",945:"3694633c",972:"01a5a892"}[e]+".js"},u.miniCssF=function(e){},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="taskfile-dev:",u.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var c,i;if(void 0!==n)for(var a=document.getElementsByTagName("script"),d=0;d=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[a])}))?n.splice(a--,1):(c=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},u.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);u.r(o);var f={};t=t||[null,n({}),n([]),n(n)];for(var c=2&r&&e;"object"==typeof c&&!~t.indexOf(c);c=n(c))Object.getOwnPropertyNames(c).forEach((function(t){f[t]=function(){return e[t]}}));return f.default=function(){return e},u.d(o,f),o},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=function(e){return Promise.all(Object.keys(u.f).reduce((function(t,n){return u.f[n](e,t),t}),[]))},u.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",840:"fece9508",880:"5ef0e9d6",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{34:"56f62242",53:"37fa500e",80:"107551a6",133:"6862b446",217:"54a24181",252:"785d3a50",514:"9062895a",552:"157e2f08",582:"b03e9d37",595:"c5627647",648:"40860e03",671:"47884a35",705:"a781d43d",713:"eab54ff0",780:"b979b06f",827:"fa3f1cc9",836:"ba71a399",840:"3b88db36",880:"07fd3925",894:"4bf7d380",918:"e75765f6",920:"a9132d06",945:"3694633c",972:"01a5a892"}[e]+".js"},u.miniCssF=function(e){},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="taskfile-dev:",u.l=function(e,t,n,f){if(r[e])r[e].push(t);else{var c,a;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d