diff --git a/404.html b/404.html index dcab0246..cdf65407 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 36ab130d..739dce24 100644 --- a/api/index.html +++ b/api/index.html @@ -10,7 +10,7 @@ - + @@ -26,7 +26,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/935f2afb.f7f075d7.js b/assets/js/935f2afb.537af6af.js similarity index 96% rename from assets/js/935f2afb.f7f075d7.js rename to assets/js/935f2afb.537af6af.js index 8e086cf6..53d34b8b 100644 --- a/assets/js/935f2afb.f7f075d7.js +++ b/assets/js/935f2afb.537af6af.js @@ -1 +1 @@ -"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Home","href":"/","docId":"intro"},{"type":"link","label":"Installation","href":"/installation/","docId":"installation"},{"type":"link","label":"Usage","href":"/usage/","docId":"usage"},{"type":"link","label":"API Reference","href":"/api/","docId":"api_reference"},{"type":"category","label":"Experiments","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Workflow","href":"/experiments/workflow/","docId":"experiments/workflow"}],"href":"/experiments/"},{"type":"link","label":"Integrations","href":"/integrations/","docId":"integrations"},{"type":"link","label":"FAQ","href":"/faq/","docId":"faq"},{"type":"link","label":"Styleguide","href":"/styleguide/","docId":"styleguide"},{"type":"link","label":"Changelog","href":"/changelog/","docId":"changelog"},{"type":"link","label":"Community","href":"/community/","docId":"community"},{"type":"link","label":"Contributing","href":"/contributing/","docId":"contributing"},{"type":"link","label":"Translate","href":"/translate/","docId":"translate"},{"type":"link","label":"Releasing","href":"/releasing/","docId":"releasing"},{"type":"link","label":"Taskfile Versions","href":"/taskfile-versions/","docId":"taskfile_versions"},{"type":"link","label":"Donate","href":"/donate/","docId":"donate"}]},"docs":{"api_reference":{"id":"api_reference","title":"API Reference","description":"CLI","sidebar":"tutorialSidebar"},"changelog":{"id":"changelog","title":"Changelog","description":"v3.25.0 - 2023-05-22","sidebar":"tutorialSidebar"},"community":{"id":"community","title":"Community","description":"Some of the work to improve the Task ecosystem is done by the community, be it","sidebar":"tutorialSidebar"},"contributing":{"id":"contributing","title":"Contributing","description":"Contributions to Task are very welcome, but we ask that you read this document","sidebar":"tutorialSidebar"},"donate":{"id":"donate","title":"Donate","description":"If you find this project useful, you can consider donating by using one of the","sidebar":"tutorialSidebar"},"experiments/experiments":{"id":"experiments/experiments","title":"Experiments","description":"All experimental features are subject to breaking changes and/or removal _at any","sidebar":"tutorialSidebar"},"experiments/workflow":{"id":"experiments/workflow","title":"Workflow","description":"Experiments are a way for us to test out new features in Task before committing","sidebar":"tutorialSidebar"},"faq":{"id":"faq","title":"FAQ","description":"This page contains a list of frequently asked questions about Task.","sidebar":"tutorialSidebar"},"installation":{"id":"installation","title":"Installation","description":"Task offers many installation methods. Check out the available methods below.","sidebar":"tutorialSidebar"},"integrations":{"id":"integrations","title":"Integrations","description":"Visual Studio Code Extension","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Home","description":"Task is a task runner / build tool that aims to be simpler and easier to use","sidebar":"tutorialSidebar"},"releasing":{"id":"releasing","title":"Releasing","description":"The release process of Task is done with the help of GoReleaser.","sidebar":"tutorialSidebar"},"styleguide":{"id":"styleguide","title":"Styleguide","description":"This is the official Task styleguide for Taskfile.yml files. This guide","sidebar":"tutorialSidebar"},"taskfile_versions":{"id":"taskfile_versions","title":"Taskfile Versions","description":"The Taskfile syntax and features changed with time. This document explains what","sidebar":"tutorialSidebar"},"translate":{"id":"translate","title":"Translate","description":"Want to help us translate this documentation? In this document we explain how.","sidebar":"tutorialSidebar"},"usage":{"id":"usage","title":"Usage","description":"Getting started","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Home","href":"/","docId":"intro"},{"type":"link","label":"Installation","href":"/installation/","docId":"installation"},{"type":"link","label":"Usage","href":"/usage/","docId":"usage"},{"type":"link","label":"API Reference","href":"/api/","docId":"api_reference"},{"type":"category","label":"Experiments","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Workflow","href":"/experiments/workflow/","docId":"experiments/workflow"}],"href":"/experiments/"},{"type":"link","label":"Integrations","href":"/integrations/","docId":"integrations"},{"type":"link","label":"FAQ","href":"/faq/","docId":"faq"},{"type":"link","label":"Styleguide","href":"/styleguide/","docId":"styleguide"},{"type":"link","label":"Changelog","href":"/changelog/","docId":"changelog"},{"type":"link","label":"Community","href":"/community/","docId":"community"},{"type":"link","label":"Contributing","href":"/contributing/","docId":"contributing"},{"type":"link","label":"Translate","href":"/translate/","docId":"translate"},{"type":"link","label":"Releasing","href":"/releasing/","docId":"releasing"},{"type":"link","label":"Taskfile Versions","href":"/taskfile-versions/","docId":"taskfile_versions"},{"type":"link","label":"Donate","href":"/donate/","docId":"donate"}]},"docs":{"api_reference":{"id":"api_reference","title":"API Reference","description":"CLI","sidebar":"tutorialSidebar"},"changelog":{"id":"changelog","title":"Changelog","description":"v3.26.0 = 2023-06-10","sidebar":"tutorialSidebar"},"community":{"id":"community","title":"Community","description":"Some of the work to improve the Task ecosystem is done by the community, be it","sidebar":"tutorialSidebar"},"contributing":{"id":"contributing","title":"Contributing","description":"Contributions to Task are very welcome, but we ask that you read this document","sidebar":"tutorialSidebar"},"donate":{"id":"donate","title":"Donate","description":"If you find this project useful, you can consider donating by using one of the","sidebar":"tutorialSidebar"},"experiments/experiments":{"id":"experiments/experiments","title":"Experiments","description":"All experimental features are subject to breaking changes and/or removal _at any","sidebar":"tutorialSidebar"},"experiments/workflow":{"id":"experiments/workflow","title":"Workflow","description":"Experiments are a way for us to test out new features in Task before committing","sidebar":"tutorialSidebar"},"faq":{"id":"faq","title":"FAQ","description":"This page contains a list of frequently asked questions about Task.","sidebar":"tutorialSidebar"},"installation":{"id":"installation","title":"Installation","description":"Task offers many installation methods. Check out the available methods below.","sidebar":"tutorialSidebar"},"integrations":{"id":"integrations","title":"Integrations","description":"Visual Studio Code Extension","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Home","description":"Task is a task runner / build tool that aims to be simpler and easier to use","sidebar":"tutorialSidebar"},"releasing":{"id":"releasing","title":"Releasing","description":"The release process of Task is done with the help of GoReleaser.","sidebar":"tutorialSidebar"},"styleguide":{"id":"styleguide","title":"Styleguide","description":"This is the official Task styleguide for Taskfile.yml files. This guide","sidebar":"tutorialSidebar"},"taskfile_versions":{"id":"taskfile_versions","title":"Taskfile Versions","description":"The Taskfile syntax and features changed with time. This document explains what","sidebar":"tutorialSidebar"},"translate":{"id":"translate","title":"Translate","description":"Want to help us translate this documentation? In this document we explain how.","sidebar":"tutorialSidebar"},"usage":{"id":"usage","title":"Usage","description":"Getting started","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/9beb87c2.a857c35b.js b/assets/js/9beb87c2.a857c35b.js new file mode 100644 index 00000000..2b9f8a56 --- /dev/null +++ b/assets/js/9beb87c2.a857c35b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[34],{3905:function(t,e,a){a.d(e,{Zo:function(){return h},kt:function(){return d}});var i=a(7294);function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function l(t){for(var e=1;e=0||(s[a]=t[a]);return s}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(s[a]=t[a])}return s}var o=i.createContext({}),k=function(t){var e=i.useContext(o),a=e;return t&&(a="function"==typeof t?t(e):l(l({},e),t)),a},h=function(t){var e=k(t.components);return i.createElement(o.Provider,{value:e},t.children)},m="mdxType",p={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},u=i.forwardRef((function(t,e){var a=t.components,s=t.mdxType,n=t.originalType,o=t.parentName,h=r(t,["components","mdxType","originalType","parentName"]),m=k(a),u=s,d=m["".concat(o,".").concat(u)]||m[u]||p[u]||n;return a?i.createElement(d,l(l({ref:e},h),{},{components:a})):i.createElement(d,l({ref:e},h))}));function d(t,e){var a=arguments,s=e&&e.mdxType;if("string"==typeof t||s){var n=a.length,l=new Array(n);l[0]=u;var r={};for(var o in e)hasOwnProperty.call(e,o)&&(r[o]=e[o]);r.originalType=t,r[m]="string"==typeof t?t:s,l[1]=r;for(var k=2;k=0||(s[a]=t[a]);return s}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(s[a]=t[a])}return s}var o=i.createContext({}),k=function(t){var e=i.useContext(o),a=e;return t&&(a="function"==typeof t?t(e):l(l({},e),t)),a},h=function(t){var e=k(t.components);return i.createElement(o.Provider,{value:e},t.children)},m="mdxType",p={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},u=i.forwardRef((function(t,e){var a=t.components,s=t.mdxType,n=t.originalType,o=t.parentName,h=r(t,["components","mdxType","originalType","parentName"]),m=k(a),u=s,d=m["".concat(o,".").concat(u)]||m[u]||p[u]||n;return a?i.createElement(d,l(l({ref:e},h),{},{components:a})):i.createElement(d,l({ref:e},h))}));function d(t,e){var a=arguments,s=e&&e.mdxType;if("string"==typeof t||s){var n=a.length,l=new Array(n);l[0]=u;var r={};for(var o in e)hasOwnProperty.call(e,o)&&(r[o]=e[o]);r.originalType=t,r[m]="string"==typeof t?t:s,l[1]=r;for(var k=2;k=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[i])}))?n.splice(i--,1):(a=!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 a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).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",102:"f5e0ac0d",133:"f1d66b0d",217:"3b8c55ea",252:"02371786",408:"10b6b177",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:"a857c35b",53:"537af6af",80:"c115a808",102:"2e02724b",133:"6862b446",217:"54a24181",252:"4fb3f7b7",408:"dbb3244c",514:"9062895a",552:"082e89ee",582:"ed61ab50",595:"c5627647",648:"a797772f",671:"47884a35",705:"dc7fd676",713:"a80a00cf",780:"b979b06f",827:"7659f4c6",836:"b4b26960",840:"1f20fde6",880:"378b917a",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 a,i;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[c])}))?n.splice(c--,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",102:"f5e0ac0d",133:"f1d66b0d",217:"3b8c55ea",252:"02371786",408:"10b6b177",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:"e3d1628b",53:"f7f075d7",80:"c115a808",102:"2e02724b",133:"6862b446",217:"54a24181",252:"4fb3f7b7",408:"dbb3244c",514:"9062895a",552:"082e89ee",582:"ed61ab50",595:"c5627647",648:"a797772f",671:"47884a35",705:"dc7fd676",713:"a80a00cf",780:"b979b06f",827:"7659f4c6",836:"b4b26960",840:"1f20fde6",880:"378b917a",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,c;if(void 0!==n)for(var a=document.getElementsByTagName("script"),d=0;d -Changelog | Task +Changelog | Task - +
-

Changelog

v3.25.0 - 2023-05-22

- +cancelled, if one returned an error)

v1.2.0 - 2017-04-02

  • More tests and Travis integration
  • Watch a task (experimental)
  • Possibility to call another task
  • Fix "=" not being reconized in variables/environment variables
  • Tasks can now have a description, and help will print them (#10)
  • Task dependencies now run concurrently
  • Support for a default task (#16)

v1.1.0 - 2017-03-08

  • Support for YAML, TOML and JSON (#1)
  • Support running command in another directory (#4)
  • --force or -f flag to force execution of task even when it's up-to-date
  • Detection of cyclic dependencies (#5)
  • Support for variables (#6, #9, #14)
  • Operation System specific commands and variables (#13)

v1.0.0 - 2017-02-28

  • Add LICENSE file
+ \ No newline at end of file diff --git a/community/index.html b/community/index.html index 537ab380..67a9961f 100644 --- a/community/index.html +++ b/community/index.html @@ -10,7 +10,7 @@ - + @@ -29,7 +29,7 @@ can view the full list of community integrations reported bugs and answered questions.

If you know something that is missing in this document, please submit a pull request.

- + \ No newline at end of file diff --git a/contributing/index.html b/contributing/index.html index 6cc03ca5..c89805dd 100644 --- a/contributing/index.html +++ b/contributing/index.html @@ -10,7 +10,7 @@ - + @@ -83,7 +83,7 @@ contributions.

All kinds of contributions are welcome, whether its a typo feature. You can also contribute by upvoting/commenting on issues, helping to answer questions or contributing to other community projects.

I'm stuck, where can I get help?

If you have questions, feel free to ask them in the #help forum channel on our Discord server or open a Discussion on GitHub.


- + \ No newline at end of file diff --git a/donate/index.html b/donate/index.html index 9f428ba7..4e5551ad 100644 --- a/donate/index.html +++ b/donate/index.html @@ -10,7 +10,7 @@ - + @@ -24,7 +24,7 @@ the website homepage and on the GitHub repository README. Make contact with the following links to do your donation:

Open Collective

If you prefer Open Collective you can donate by using these links:

PayPal

You can donate to @andreynering via PayPal as well:

PIX (Brazil only)

And if you're Brazilian, you can also donate to @andreynering via PIX by using this QR Code.

- + \ No newline at end of file diff --git a/experiments/index.html b/experiments/index.html index 3314dd80..758a0e8c 100644 --- a/experiments/index.html +++ b/experiments/index.html @@ -10,7 +10,7 @@ - + @@ -34,7 +34,7 @@ schemas. However, support will not be extended to future major releases and we strongly recommend that anybody still using a version 2 schema upgrades to version 3 as soon as possible.

A list of changes between version 2 and version 3 are available in the Task v3 Release Notes.

- + \ No newline at end of file diff --git a/experiments/workflow/index.html b/experiments/workflow/index.html index 13312a3b..1a1771cd 100644 --- a/experiments/workflow/index.html +++ b/experiments/workflow/index.html @@ -10,7 +10,7 @@ - + @@ -51,7 +51,7 @@ Task. Experiments in an earlier stage (i.e. not stable) cannot be released and so will continue to be experiments in the new version.

Abandoned / Superseded

If an experiment is unsuccessful at any point then it will be given the abandoned or superseded labels depending on which is more suitable. These experiments will be removed from Task.

- + \ No newline at end of file diff --git a/faq/index.html b/faq/index.html index fd69068d..1a122a6e 100644 --- a/faq/index.html +++ b/faq/index.html @@ -10,7 +10,7 @@ - + @@ -29,7 +29,7 @@ around this limitation using one of the following methods:

  • Use the
  • Use a shell on Windows that supports these commands as builtins, such as Git Bash or WSL.

We want to make improvements to this part of Task and the issues below track this work. Constructive comments and contributions are very welcome!

- + \ No newline at end of file diff --git a/index.html b/index.html index 07b8f9fc..602c1a5f 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - + @@ -29,7 +29,7 @@ Task also supports Windows thanks to prevent a task from running if a given set of files haven't changed since last run (based either on its timestamp or content).

Gold Sponsors

- + \ No newline at end of file diff --git a/installation/index.html b/installation/index.html index 3c3244c8..16dfb5b8 100644 --- a/installation/index.html +++ b/installation/index.html @@ -10,7 +10,7 @@ - + @@ -51,7 +51,7 @@ setup. You can find the minimum required version of Go in the go.mod file.

You can then install the latest release globally by running:

go install github.com/go-task/task/v3/cmd/task@latest

Or you can install into another directory:

env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest
tip

For CI environments we recommend using the install script instead, which is faster and more stable, since it'll just download the latest released binary.

Setup completions

Download the autocompletion file corresponding to your shell.

All completions are available on the Task repository.

Bash

First, ensure that you installed bash-completion using your package manager.

Make the completion file executable:

chmod +x path/to/task.bash

After, add this to your ~/.bash_profile:

source path/to/task.bash

ZSH

Put the _task file somewhere in your $FPATH:

mv path/to/_task /usr/local/share/zsh/site-functions/_task

Ensure that the following is present in your ~/.zshrc:

autoload -U compinit
compinit -i

ZSH version 5.7 or later is recommended.

Fish

Move the task.fish completion script:

mv path/to/task.fish ~/.config/fish/completions/task.fish

PowerShell

Open your profile script with:

mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
notepad $profile

Add the line and save the file:

Invoke-Expression -Command path/to/task.ps1
- + \ No newline at end of file diff --git a/integrations/index.html b/integrations/index.html index 389f2cf7..4b78e4c7 100644 --- a/integrations/index.html +++ b/integrations/index.html @@ -10,7 +10,7 @@ - + @@ -40,7 +40,7 @@ developers who have created their own integrations for Task:

If you have made something that integrates with Task, please feel free to open a PR to add it to this list.

- + \ No newline at end of file diff --git a/releasing/index.html b/releasing/index.html index dcf30d39..33a69699 100644 --- a/releasing/index.html +++ b/releasing/index.html @@ -10,7 +10,7 @@ - + @@ -34,7 +34,7 @@ If you think its Task version is outdated, open an issue to let us know.

take care of updating versions there by editing this file. If you think its Task version is outdated, open an issue to let us know.

- + \ No newline at end of file diff --git a/search/index.html b/search/index.html index c169709e..a665d296 100644 --- a/search/index.html +++ b/search/index.html @@ -10,13 +10,13 @@ - + - + \ No newline at end of file diff --git a/styleguide/index.html b/styleguide/index.html index 201ef599..70dcd9de 100644 --- a/styleguide/index.html +++ b/styleguide/index.html @@ -10,7 +10,7 @@ - + @@ -23,7 +23,7 @@ need or want to. Also, feel free to open issues or pull requests with improvements to this guide.

Use Taskfile.yml and not taskfile.yml

# bad
taskfile.yml


# good
Taskfile.yml

This is important especially for Linux users. Windows and macOS have case insensitive filesystems, so taskfile.yml will end up working, even that not officially supported. On Linux, only Taskfile.yml will work, though.

Use the correct order of keywords

  • version:
  • includes:
  • Configuration ones, like output:, silent:, method: and run:
  • vars:
  • env:, dotenv:
  • tasks:

Use 2 spaces for indentation

This is the most common convention for YAML files, and Task follows it.

# bad
tasks:
foo:
cmds:
- echo 'foo'


# good
tasks:
foo:
cmds:
- echo 'foo'

Separate with spaces the mains sections

# bad
version: '3'
includes:
docker: ./docker/Taskfile.yml
output: prefixed
vars:
FOO: bar
env:
BAR: baz
tasks:
# ...


# good
version: '3'

includes:
docker: ./docker/Taskfile.yml

output: prefixed

vars:
FOO: bar

env:
BAR: baz

tasks:
# ...

Add spaces between tasks

# bad
version: '3'

tasks:
foo:
cmds:
- echo 'foo'
bar:
cmds:
- echo 'bar'
baz:
cmds:
- echo 'baz'


# good
version: '3'

tasks:
foo:
cmds:
- echo 'foo'

bar:
cmds:
- echo 'bar'

baz:
cmds:
- echo 'baz'

Use upper-case variable names

# bad
version: '3'

vars:
binary_name: myapp

tasks:
build:
cmds:
- go build -o {{.binary_name}} .


# good
version: '3'

vars:
BINARY_NAME: myapp

tasks:
build:
cmds:
- go build -o {{.BINARY_NAME}} .

Don't wrap vars in spaces when templating

# bad
version: '3'

tasks:
greet:
cmds:
- echo '{{ .MESSAGE }}'


# good
version: '3'

tasks:
greet:
cmds:
- echo '{{.MESSAGE}}'

This convention is also used by most people for any Go templating.

Separate task name words with a dash

# bad
version: '3'

tasks:
do_something_fancy:
cmds:
- echo 'Do something'


# good
version: '3'

tasks:
do-something-fancy:
cmds:
- echo 'Do something'

Use colon for task namespacing

# good
version: '3'

tasks:
docker:build:
cmds:
- docker ...

docker:run:
cmds:
- docker-compose ...

This is also done automatically when using included Taskfiles.

Prefer external scripts over complex multi-line commands

# bad
version: '3'

tasks:
build:
cmds:
- |
for i in $(seq 1 10); do
echo $i
echo "some other complex logic"
done'

# good
version: '3'

tasks:
build:
cmds:
- ./scripts/my_complex_script.sh
- + \ No newline at end of file diff --git a/taskfile-versions/index.html b/taskfile-versions/index.html index 84e4d146..89fa7ae5 100644 --- a/taskfile-versions/index.html +++ b/taskfile-versions/index.html @@ -10,7 +10,7 @@ - + @@ -40,7 +40,7 @@ new features without breaking existing Taskfiles. The new syntax is as follows:< don't want to create a Taskvars.yml:

version: '2'

vars:
GREETING: Hello, World!

tasks:
greet:
cmds:
- echo "{{.GREETING}}"

The variable priority order changed to the following:

  1. Task variables
  2. Call variables
  3. Taskfile variables
  4. Taskvars file variables
  5. Environment variables

A new global option was added to configure the number of variables expansions (which default to 2):

version: '2'

expansions: 3

vars:
FOO: foo
BAR: bar
BAZ: baz
FOOBAR: '{{.FOO}}{{.BAR}}'
FOOBARBAZ: '{{.FOOBAR}}{{.BAZ}}'

tasks:
default:
cmds:
- echo "{{.FOOBARBAZ}}"

Version 1

caution

v1 schema support was removed in Task >= v3.0.0.

In the first version of the Taskfile, the version: key was not available, because the tasks was in the root of the YAML document. Like this:

echo:
cmds:
- echo "Hello, World!"

The variable priority order was also different:

  1. Call variables
  2. Environment
  3. Task variables
  4. Taskvars.yml variables
- + \ No newline at end of file diff --git a/translate/index.html b/translate/index.html index bbbdfb1e..fd924d96 100644 --- a/translate/index.html +++ b/translate/index.html @@ -10,7 +10,7 @@ - + @@ -21,7 +21,7 @@ is periodically updated with progress from Crowdin.

If you want to have ac translations, please ask for access on the #translations channel on our Discord server. If a given language is not being shown to Crowdin yet, just ask and we can configure it.

- + \ No newline at end of file diff --git a/usage/index.html b/usage/index.html index 594327f4..8e801f98 100644 --- a/usage/index.html +++ b/usage/index.html @@ -10,7 +10,7 @@ - + @@ -220,7 +220,7 @@ task again. This requires the sources attribute to be given, so tas which files to watch.

The default watch interval is 5 seconds, but it's possible to change it by either setting interval: '500ms' in the root of the Taskfile passing it as an argument like --interval=500ms.

- + \ No newline at end of file