diff --git a/404.html b/404.html index 91e0efc0..3a5ad5c9 100644 --- a/404.html +++ b/404.html @@ -12,13 +12,13 @@ Page Not Found | Task - +
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 7c2a4689..c8b8037a 100644 --- a/api/index.html +++ b/api/index.html @@ -12,7 +12,7 @@ API Reference | Task - + @@ -22,7 +22,7 @@ variable

ShortFlagTypecmds and everything else will be set to their default values:

tasks:
foo: echo "foo"

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

baz:
cmd: echo "baz"

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]

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.
info

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

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

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"

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/files/schema-a2ea47008ccde07caab87e7b5eee44dd.json b/assets/files/schema-45eea8bc2c32fa28a4cb9a20061db5b0.json similarity index 99% rename from assets/files/schema-a2ea47008ccde07caab87e7b5eee44dd.json rename to assets/files/schema-45eea8bc2c32fa28a4cb9a20061db5b0.json index fa9afba3..f0e52b89 100644 --- a/assets/files/schema-a2ea47008ccde07caab87e7b5eee44dd.json +++ b/assets/files/schema-45eea8bc2c32fa28a4cb9a20061db5b0.json @@ -260,7 +260,7 @@ } } }, - "oneOf": [ + "allOf": [ { "type": "object", "properties": { diff --git a/assets/js/4d54d076.04930f62.js b/assets/js/4d54d076.f694b209.js similarity index 99% rename from assets/js/4d54d076.04930f62.js rename to assets/js/4d54d076.f694b209.js index de888b18..39704533 100644 --- a/assets/js/4d54d076.04930f62.js +++ b/assets/js/4d54d076.f694b209.js @@ -1 +1 @@ -"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[80],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),l=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=l(e.components);return a.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,u=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,h=p["".concat(u,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(h,o(o({ref:t},c),{},{components:n})):a.createElement(h,o({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var l=2;l "),"."),(0,i.kt)("h3",{id:"updating-documentation"},"Updating documentation"),(0,i.kt)("p",null,"Task uses ",(0,i.kt)("a",{parentName:"p",href:"https://docusaurus.io"},"Docusaurus")," to host a documentation server. This can be setup and run\nlocally by using ",(0,i.kt)("inlineCode",{parentName:"p"},"task docs:setup")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"task docs:start")," respectively (requires\n",(0,i.kt)("inlineCode",{parentName:"p"},"nodejs")," & ",(0,i.kt)("inlineCode",{parentName:"p"},"yarn"),"). All content is written in Markdown and is located in the\n",(0,i.kt)("inlineCode",{parentName:"p"},"docs/docs")," directory. All Markdown documents should have an 80 character line\nwrap limit."),(0,i.kt)("p",null,"When making a change, consider whether a change to the ",(0,i.kt)("a",{parentName:"p",href:"/usage/"},"Usage Guide"),"\nis necessary. This document contains descriptions and examples of how to use\nTask features. If you're adding a new feature, try to find an appropriate place\nto add a new section. If you're updating an existing feature, ensure that the\ndocumentation and any examples are up-to-date. Ensure that any examples follow\nthe ",(0,i.kt)("a",{parentName:"p",href:"/styleguide/"},"Taskfile Styleguide"),"."),(0,i.kt)("p",null,"If you added a new field, command or flag, ensure that you add it to the ",(0,i.kt)("a",{parentName:"p",href:"/api/"},"API\nReference"),". New fields also need to be added to the\n",(0,i.kt)("a",{target:"_blank",href:n(3624).Z},"JSON Schema"),". The descriptions for fields in the API\nreference and the schema should match."),(0,i.kt)("h3",{id:"writing-tests"},"Writing tests"),(0,i.kt)("p",null,"Most of Task's test are held in the ",(0,i.kt)("inlineCode",{parentName:"p"},"task_test.go")," file in the project root and\nthis is where you'll most likely want to add new ones too. Most of these tests\nalso have a subdirectory in the ",(0,i.kt)("inlineCode",{parentName:"p"},"testdata")," directory where any Taskfiles/data\nrequired to run the tests are stored."),(0,i.kt)("p",null,"When making a changes, consider whether new tests are required. These tests\nshould ensure that the functionality you are adding will continue to work in the\nfuture. Existing tests may also need updating if you have changed Task's\nbehaviour."),(0,i.kt)("h2",{id:"3-committing-your-code"},"3. Committing your code"),(0,i.kt)("p",null,"Try to write meaningful commit messages and avoid having too many commits on\nthe PR. Most PRs should likely have a single commit (although for bigger PRs it\nmay be reasonable to split it in a few). Git squash and rebase is your friend!"),(0,i.kt)("h2",{id:"4-submitting-a-pr"},"4. Submitting a PR"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Describe your changes")," - Ensure that you provide a comprehensive\ndescription of your changes."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Issue/PR links")," - Link any previous work such as related issues or PRs.\nPlease describe how your changes differ to/extend this work."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Examples")," - Add any examples that you think are useful to demonstrate the\neffect of your changes."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Draft PRs")," - If your changes are incomplete, but you would like to discuss\nthem, open the PR as a draft and add a comment to start a discussion. Using\ncomments rather than the PR description allows the description to be updated\nlater while preserving any discussions.")),(0,i.kt)("h2",{id:"faq"},"FAQ"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"I want to contribute, where do I start?")),(0,i.kt)("p",null,"Take a look at the list of ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-task/task/issues"},"open issues"),". We have a ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22"},"good first issue")," label for\nsimpler issues that are ideal for first time contributions."),(0,i.kt)("p",null,"All kinds of contributions are welcome, whether its a typo fix or a shiny new\nfeature. You can also contribute by upvoting/commenting on issues, helping to\nanswer questions or contributing to other ",(0,i.kt)("a",{parentName:"p",href:"/community/"},"community projects"),"."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"I'm stuck, where can I get help?")),(0,i.kt)("p",null,"If you have questions, feel free to ask them in the ",(0,i.kt)("inlineCode",{parentName:"p"},"#help")," channel on our\n",(0,i.kt)("a",{parentName:"p",href:"https://discord.gg/6TY36E39UK"},"Discord server"),"."),(0,i.kt)("hr",null))}m.isMDXComponent=!0},3624:function(e,t,n){t.Z=n.p+"assets/files/schema-a2ea47008ccde07caab87e7b5eee44dd.json"}}]); \ No newline at end of file +"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[80],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),l=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=l(e.components);return a.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,u=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=l(n),m=r,h=p["".concat(u,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(h,o(o({ref:t},c),{},{components:n})):a.createElement(h,o({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=p;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var l=2;l "),"."),(0,i.kt)("h3",{id:"updating-documentation"},"Updating documentation"),(0,i.kt)("p",null,"Task uses ",(0,i.kt)("a",{parentName:"p",href:"https://docusaurus.io"},"Docusaurus")," to host a documentation server. This can be setup and run\nlocally by using ",(0,i.kt)("inlineCode",{parentName:"p"},"task docs:setup")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"task docs:start")," respectively (requires\n",(0,i.kt)("inlineCode",{parentName:"p"},"nodejs")," & ",(0,i.kt)("inlineCode",{parentName:"p"},"yarn"),"). All content is written in Markdown and is located in the\n",(0,i.kt)("inlineCode",{parentName:"p"},"docs/docs")," directory. All Markdown documents should have an 80 character line\nwrap limit."),(0,i.kt)("p",null,"When making a change, consider whether a change to the ",(0,i.kt)("a",{parentName:"p",href:"/usage/"},"Usage Guide"),"\nis necessary. This document contains descriptions and examples of how to use\nTask features. If you're adding a new feature, try to find an appropriate place\nto add a new section. If you're updating an existing feature, ensure that the\ndocumentation and any examples are up-to-date. Ensure that any examples follow\nthe ",(0,i.kt)("a",{parentName:"p",href:"/styleguide/"},"Taskfile Styleguide"),"."),(0,i.kt)("p",null,"If you added a new field, command or flag, ensure that you add it to the ",(0,i.kt)("a",{parentName:"p",href:"/api/"},"API\nReference"),". New fields also need to be added to the\n",(0,i.kt)("a",{target:"_blank",href:n(3624).Z},"JSON Schema"),". The descriptions for fields in the API\nreference and the schema should match."),(0,i.kt)("h3",{id:"writing-tests"},"Writing tests"),(0,i.kt)("p",null,"Most of Task's test are held in the ",(0,i.kt)("inlineCode",{parentName:"p"},"task_test.go")," file in the project root and\nthis is where you'll most likely want to add new ones too. Most of these tests\nalso have a subdirectory in the ",(0,i.kt)("inlineCode",{parentName:"p"},"testdata")," directory where any Taskfiles/data\nrequired to run the tests are stored."),(0,i.kt)("p",null,"When making a changes, consider whether new tests are required. These tests\nshould ensure that the functionality you are adding will continue to work in the\nfuture. Existing tests may also need updating if you have changed Task's\nbehaviour."),(0,i.kt)("h2",{id:"3-committing-your-code"},"3. Committing your code"),(0,i.kt)("p",null,"Try to write meaningful commit messages and avoid having too many commits on\nthe PR. Most PRs should likely have a single commit (although for bigger PRs it\nmay be reasonable to split it in a few). Git squash and rebase is your friend!"),(0,i.kt)("h2",{id:"4-submitting-a-pr"},"4. Submitting a PR"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Describe your changes")," - Ensure that you provide a comprehensive\ndescription of your changes."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Issue/PR links")," - Link any previous work such as related issues or PRs.\nPlease describe how your changes differ to/extend this work."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Examples")," - Add any examples that you think are useful to demonstrate the\neffect of your changes."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"Draft PRs")," - If your changes are incomplete, but you would like to discuss\nthem, open the PR as a draft and add a comment to start a discussion. Using\ncomments rather than the PR description allows the description to be updated\nlater while preserving any discussions.")),(0,i.kt)("h2",{id:"faq"},"FAQ"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"I want to contribute, where do I start?")),(0,i.kt)("p",null,"Take a look at the list of ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-task/task/issues"},"open issues"),". We have a ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22"},"good first issue")," label for\nsimpler issues that are ideal for first time contributions."),(0,i.kt)("p",null,"All kinds of contributions are welcome, whether its a typo fix or a shiny new\nfeature. You can also contribute by upvoting/commenting on issues, helping to\nanswer questions or contributing to other ",(0,i.kt)("a",{parentName:"p",href:"/community/"},"community projects"),"."),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"I'm stuck, where can I get help?")),(0,i.kt)("p",null,"If you have questions, feel free to ask them in the ",(0,i.kt)("inlineCode",{parentName:"p"},"#help")," channel on our\n",(0,i.kt)("a",{parentName:"p",href:"https://discord.gg/6TY36E39UK"},"Discord server"),"."),(0,i.kt)("hr",null))}m.isMDXComponent=!0},3624:function(e,t,n){t.Z=n.p+"assets/files/schema-45eea8bc2c32fa28a4cb9a20061db5b0.json"}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.bd011549.js b/assets/js/runtime~main.ec420539.js similarity index 98% rename from assets/js/runtime~main.bd011549.js rename to assets/js/runtime~main.ec420539.js index 093753e1..fbb55f16 100644 --- a/assets/js/runtime~main.bd011549.js +++ b/assets/js/runtime~main.ec420539.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,f={},u={};function i(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={id:e,loaded:!1,exports:{}};return f[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=f,i.c=u,e=[],i.O=function(t,n,r,o){if(!n){var f=1/0;for(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",514:"1be78505",552:"0afd354a",582:"f7fd502c",595:"d0766b26",648:"3c140c84",671:"0e384e19",705:"7d415946",713:"1c56b476",827:"6476eba6",880:"5ef0e9d6",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{34:"d5b0b236",53:"83f99ec5",80:"04930f62",133:"6862b446",217:"56b0644b",514:"39ae2946",552:"d66f7d0f",582:"5c37dc10",595:"c5627647",608:"10f8675e",648:"c2d43167",671:"f3a4ab38",705:"055c0eb0",713:"98086b3b",780:"8efbf5ce",827:"68561605",880:"1e7e2120",894:"4bf7d380",918:"58fb0a3d",920:"eb9e742a",945:"3694633c"}[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",514:"1be78505",552:"0afd354a",582:"f7fd502c",595:"d0766b26",648:"3c140c84",671:"0e384e19",705:"7d415946",713:"1c56b476",827:"6476eba6",880:"5ef0e9d6",918:"17896441",920:"1a4e3797"}[e]||e)+"."+{34:"d5b0b236",53:"83f99ec5",80:"f694b209",133:"6862b446",217:"56b0644b",514:"39ae2946",552:"d66f7d0f",582:"5c37dc10",595:"c5627647",608:"10f8675e",648:"c2d43167",671:"f3a4ab38",705:"055c0eb0",713:"98086b3b",780:"8efbf5ce",827:"68561605",880:"1e7e2120",894:"4bf7d380",918:"58fb0a3d",920:"eb9e742a",945:"3694633c"}[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