From bb36711270dd7f05a123cc58de7b626abfede983 Mon Sep 17 00:00:00 2001 From: task-bot <106601941+task-bot@users.noreply.github.com> Date: Sat, 14 Jan 2023 20:18:52 +0000 Subject: [PATCH] deploy: 347fcf9f677afd9cb0b3e8baff0bbe6d4d1ea22a --- 404.html | 4 ++-- api/index.html | 4 ++-- .../js/{6476eba6.731b757b.js => 6476eba6.756bbc7c.js} | 2 +- ...ntime~main.281cdeaf.js => runtime~main.42fd07f1.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 ++-- usage/index.html | 10 +++++----- 16 files changed, 33 insertions(+), 33 deletions(-) rename assets/js/{6476eba6.731b757b.js => 6476eba6.756bbc7c.js} (50%) rename assets/js/{runtime~main.281cdeaf.js => runtime~main.42fd07f1.js} (91%) diff --git a/404.html b/404.html index 6ca87dfc..23a06d26 100644 --- a/404.html +++ b/404.html @@ -11,13 +11,13 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.svg" alt="Task Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/logo.svg" alt="Task Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Task</b></a><a class="navbar__item navbar__link" href="/installation/">Installation</a><a class="navbar__item navbar__link" href="/usage/">Usage</a><a class="navbar__item navbar__link" href="/api/">API</a><a class="navbar__item navbar__link" href="/donate/">Donate</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/api/index.html b/api/index.html index e6c8977a..b825f30b 100644 --- a/api/index.html +++ b/api/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -21,7 +21,7 @@ variable</p></div></div><table><thead><tr><th>Short</th><th>Flag</th><th>Type</t <code>cmds</code> and everything else will be set to their default values:</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> echo "foo"</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foobar</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo "foo"</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo "bar"</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">baz</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmd</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> echo "baz"</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="dependency">Dependency<a class="hash-link" href="#dependency" title="Direct link to heading"></a></h3><table><thead><tr><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>task</code></td><td><code>string</code></td><td></td><td>The task to be execute as a dependency.</td></tr><tr><td><code>vars</code></td><td><a href="#variable"><code>map[string]Variable</code></a></td><td></td><td>Optional additional variables to be passed to this task.</td></tr></tbody></table><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_S0QG"><p>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 <code>task</code>):</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">deps</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">[</span><span class="token plain">foo</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> bar</span><span class="token punctuation" style="color:#393A34">]</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="command">Command<a class="hash-link" href="#command" title="Direct link to heading"></a></h3><table><thead><tr><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>cmd</code></td><td><code>string</code></td><td></td><td>The shell command to be executed.</td></tr><tr><td><code>silent</code></td><td><code>bool</code></td><td><code>false</code></td><td>Skips some output for this command. Note that STDOUT and STDERR of the commands will still be redirected.</td></tr><tr><td><code>task</code></td><td><code>string</code></td><td></td><td>Set this to trigger execution of another task instead of running a command. This cannot be set together with <code>cmd</code>.</td></tr><tr><td><code>vars</code></td><td><a href="#variable"><code>map[string]Variable</code></a></td><td></td><td>Optional additional variables to be passed to the referenced task. Only relevant when setting <code>task</code> instead of <code>cmd</code>.</td></tr><tr><td><code>ignore_error</code></td><td><code>bool</code></td><td><code>false</code></td><td>Continue execution if errors happen while executing the command.</td></tr><tr><td><code>defer</code></td><td><code>string</code></td><td></td><td>Alternative to <code>cmd</code>, but schedules the command to be executed at the end of this task instead of immediately. This cannot be used together with <code>cmd</code>.</td></tr><tr><td><code>platforms</code></td><td><code>[]string</code></td><td>All platforms</td><td>Specifies which platforms the command should be run on. <a href="https://github.com/golang/go/blob/master/src/go/build/syslist.go" target="_blank" rel="noopener noreferrer">Valid GOOS and GOARCH values allowed</a>. Command will be skipped otherwise.</td></tr><tr><td><code>set</code></td><td><code>[]string</code></td><td></td><td>Specify options for the <a href="https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html" target="_blank" rel="noopener noreferrer"><code>set</code> builtin</a>.</td></tr><tr><td><code>shopt</code></td><td><code>[]string</code></td><td></td><td>Specify option for the <a href="https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html" target="_blank" rel="noopener noreferrer"><code>shopt</code> builtin</a>.</td></tr></tbody></table><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>If given as a a string, the value will be assigned to <code>cmd</code>:</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo "foo"</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo "bar"</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="variable">Variable<a class="hash-link" href="#variable" title="Direct link to heading"></a></h3><table><thead><tr><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><em>itself</em></td><td><code>string</code></td><td></td><td>A static value that will be set to the variable.</td></tr><tr><td><code>sh</code></td><td><code>string</code></td><td></td><td>A shell command. The output (<code>STDOUT</code>) will be assigned to the variable.</td></tr></tbody></table><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>Static and dynamic variables have different syntaxes, like below:</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#22863A">vars</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">STATIC</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> static</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">DYNAMIC</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">sh</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> echo "dynamic"</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="precondition">Precondition<a class="hash-link" href="#precondition" title="Direct link to heading"></a></h3><table><thead><tr><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><code>sh</code></td><td><code>string</code></td><td></td><td>Command to be executed. If a non-zero exit code is returned, the task errors without executing its commands.</td></tr><tr><td><code>msg</code></td><td><code>string</code></td><td></td><td>Optional message to print if the precondition isn't met.</td></tr></tbody></table><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_S0QG"><p>If you don't want to set a different message, you can declare a precondition like this and the value will be assigned to <code>sh</code>:</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">precondition</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> test </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">f Taskfile.yml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></div></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/usage/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Usage</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/faq/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">FAQ</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#cli" class="table-of-contents__link toc-highlight">CLI</a></li><li><a href="#special-variables" class="table-of-contents__link toc-highlight">Special Variables</a></li><li><a href="#env" class="table-of-contents__link toc-highlight">ENV</a></li><li><a href="#schema" class="table-of-contents__link toc-highlight">Schema</a><ul><li><a href="#taskfile" class="table-of-contents__link toc-highlight">Taskfile</a></li><li><a href="#include" class="table-of-contents__link toc-highlight">Include</a></li><li><a href="#task" class="table-of-contents__link toc-highlight">Task</a></li><li><a href="#dependency" class="table-of-contents__link toc-highlight">Dependency</a></li><li><a href="#command" class="table-of-contents__link toc-highlight">Command</a></li><li><a href="#variable" class="table-of-contents__link toc-highlight">Variable</a></li><li><a href="#precondition" class="table-of-contents__link toc-highlight">Precondition</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/assets/js/6476eba6.731b757b.js b/assets/js/6476eba6.756bbc7c.js similarity index 50% rename from assets/js/6476eba6.731b757b.js rename to assets/js/6476eba6.756bbc7c.js index b2ab7c39..e87ac6c2 100644 --- a/assets/js/6476eba6.731b757b.js +++ b/assets/js/6476eba6.756bbc7c.js @@ -1 +1 @@ -"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[827],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return k}});var a=t(7294);function i(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 s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,a,i=function(e,n){if(null==e)return{};var t,a,i={},l=Object.keys(e);for(a=0;a<l.length;a++)t=l[a],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)t=l[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var r=a.createContext({}),p=function(e){var n=a.useContext(r),t=n;return e&&(t="function"==typeof e?e(n):s(s({},n),e)),t},d=function(e){var n=p(e.components);return a.createElement(r.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},c=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,l=e.originalType,r=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),m=p(t),c=i,k=m["".concat(r,".").concat(c)]||m[c]||u[c]||l;return t?a.createElement(k,s(s({ref:n},d),{},{components:t})):a.createElement(k,s({ref:n},d))}));function k(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var l=t.length,s=new Array(l);s[0]=c;var o={};for(var r in n)hasOwnProperty.call(n,r)&&(o[r]=n[r]);o.originalType=e,o[m]="string"==typeof e?e:i,s[1]=o;for(var p=2;p<l;p++)s[p]=t[p];return a.createElement.apply(null,s)}return a.createElement.apply(null,t)}c.displayName="MDXCreateElement"},2175:function(e,n,t){t.r(n),t.d(n,{assets:function(){return r},contentTitle:function(){return s},default:function(){return m},frontMatter:function(){return l},metadata:function(){return o},toc:function(){return p}});var a=t(3117),i=(t(7294),t(3905));const l={slug:"/usage/",sidebar_position:3},s="Usage",o={unversionedId:"usage",id:"usage",title:"Usage",description:"Getting started",source:"@site/docs/usage.md",sourceDirName:".",slug:"/usage/",permalink:"/usage/",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{slug:"/usage/",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Installation",permalink:"/installation/"},next:{title:"API Reference",permalink:"/api/"}},r={},p=[{value:"Getting started",id:"getting-started",level:2},{value:"Supported file names",id:"supported-file-names",level:2},{value:"Running a Taskfile from a subdirectory",id:"running-a-taskfile-from-a-subdirectory",level:3},{value:"Environment variables",id:"environment-variables",level:2},{value:"Task",id:"task",level:3},{value:".env files",id:"env-files",level:3},{value:"Including other Taskfiles",id:"including-other-taskfiles",level:2},{value:"OS-specific Taskfiles",id:"os-specific-taskfiles",level:3},{value:"Directory of included Taskfile",id:"directory-of-included-taskfile",level:3},{value:"Optional includes",id:"optional-includes",level:3},{value:"Internal includes",id:"internal-includes",level:3},{value:"Vars of included Taskfiles",id:"vars-of-included-taskfiles",level:3},{value:"Namespace aliases",id:"namespace-aliases",level:3},{value:"Internal tasks",id:"internal-tasks",level:2},{value:"Task directory",id:"task-directory",level:2},{value:"Task dependencies",id:"task-dependencies",level:2},{value:"Platform specific tasks and commands",id:"platform-specific-tasks-and-commands",level:2},{value:"Calling another task",id:"calling-another-task",level:2},{value:"Prevent unnecessary work",id:"prevent-unnecessary-work",level:2},{value:"By fingerprinting locally generated files and their sources",id:"by-fingerprinting-locally-generated-files-and-their-sources",level:3},{value:"Using programmatic checks to indicate a task is up to date.",id:"using-programmatic-checks-to-indicate-a-task-is-up-to-date",level:3},{value:"Using programmatic checks to cancel the execution of a task and its dependencies",id:"using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies",level:3},{value:"Limiting when tasks run",id:"limiting-when-tasks-run",level:3},{value:"Variables",id:"variables",level:2},{value:"Dynamic variables",id:"dynamic-variables",level:3},{value:"Forwarding CLI arguments to commands",id:"forwarding-cli-arguments-to-commands",level:2},{value:"Doing task cleanup with <code>defer</code>",id:"doing-task-cleanup-with-defer",level:2},{value:"Go's template engine",id:"gos-template-engine",level:2},{value:"Help",id:"help",level:2},{value:"Display summary of task",id:"display-summary-of-task",level:2},{value:"Task aliases",id:"task-aliases",level:2},{value:"Overriding task name",id:"overriding-task-name",level:2},{value:"Silent mode",id:"silent-mode",level:2},{value:"Dry run mode",id:"dry-run-mode",level:2},{value:"Ignore errors",id:"ignore-errors",level:2},{value:"Output syntax",id:"output-syntax",level:2},{value:"Interactive CLI application",id:"interactive-cli-application",level:2},{value:"Short task syntax",id:"short-task-syntax",level:2},{value:"<code>set</code> and <code>shopt</code>",id:"set-and-shopt",level:2},{value:"Watch tasks",id:"watch-tasks",level:2}],d={toc:p};function m(e){let{components:n,...t}=e;return(0,i.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"usage"},"Usage"),(0,i.kt)("h2",{id:"getting-started"},"Getting started"),(0,i.kt)("p",null,"Create a file called ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml")," in the root of your project.\nThe ",(0,i.kt)("inlineCode",{parentName:"p"},"cmds")," attribute should contain the commands of a task.\nThe example below allows compiling a Go app and uses ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/tdewolff/minify/tree/master/cmd/minify"},"Minify")," to concat\nand minify multiple CSS files into a single one."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - go build -v -i main.go\n\n assets:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"Running the tasks is as simple as running:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"task assets build\n")),(0,i.kt)("p",null,"Task uses ",(0,i.kt)("a",{parentName:"p",href:"https://mvdan.cc/sh/"},"mvdan.cc/sh"),", a native Go sh\ninterpreter. So you can write sh/bash commands, and it will work even on\nWindows, where ",(0,i.kt)("inlineCode",{parentName:"p"},"sh")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"bash")," are usually not available. Just remember any\nexecutable called must be available by the OS or in PATH."),(0,i.kt)("p",null,'If you omit a task name, "default" will be assumed.'),(0,i.kt)("h2",{id:"supported-file-names"},"Supported file names"),(0,i.kt)("p",null,"Task will look for the following file names, in order of priority:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Taskfile.yml"),(0,i.kt)("li",{parentName:"ul"},"Taskfile.yaml"),(0,i.kt)("li",{parentName:"ul"},"Taskfile.dist.yml"),(0,i.kt)("li",{parentName:"ul"},"Taskfile.dist.yaml")),(0,i.kt)("p",null,"The intention of having the ",(0,i.kt)("inlineCode",{parentName:"p"},".dist")," variants is to allow projects to have one\ncommitted version (",(0,i.kt)("inlineCode",{parentName:"p"},".dist"),") while still allowing individual users to override\nthe Taskfile by adding an additional ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml")," (which would be on\n",(0,i.kt)("inlineCode",{parentName:"p"},".gitignore"),")."),(0,i.kt)("h3",{id:"running-a-taskfile-from-a-subdirectory"},"Running a Taskfile from a subdirectory"),(0,i.kt)("p",null,"If a Taskfile cannot be found in the current working directory, it will walk up\nthe file tree until it finds one (similar to how ",(0,i.kt)("inlineCode",{parentName:"p"},"git")," works). When running Task\nfrom a subdirectory like this, it will behave as if you ran it from the\ndirectory containing the Taskfile."),(0,i.kt)("p",null,"You can use this functionality along with the special ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.USER_WORKING_DIR}}"),"\nvariable to create some very useful reusable tasks. For example, if you have a\nmonorepo with directories for each microservice, you can ",(0,i.kt)("inlineCode",{parentName:"p"},"cd")," into a\nmicroservice directory and run a task command to bring it up without having to\ncreate multiple tasks or Taskfiles with identical content. For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n up:\n dir: '{{.USER_WORKING_DIR}}'\n preconditions:\n - test -f docker-compose.yml\n cmds:\n - docker-compose up -d\n")),(0,i.kt)("p",null,"In this example, we can run ",(0,i.kt)("inlineCode",{parentName:"p"},"cd <service>")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"task up")," and as long as the\n",(0,i.kt)("inlineCode",{parentName:"p"},"<service>")," directory contains a ",(0,i.kt)("inlineCode",{parentName:"p"},"docker-compose.yml"),", the Docker composition will be\nbrought up."),(0,i.kt)("h2",{id:"environment-variables"},"Environment variables"),(0,i.kt)("h3",{id:"task"},"Task"),(0,i.kt)("p",null,"You can use ",(0,i.kt)("inlineCode",{parentName:"p"},"env")," to set custom environment variables for a specific task:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n greet:\n cmds:\n - echo $GREETING\n env:\n GREETING: Hey, there!\n")),(0,i.kt)("p",null,"Additionally, you can set global environment variables that will be available\nto all tasks:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nenv:\n GREETING: Hey, there!\n\ntasks:\n greet:\n cmds:\n - echo $GREETING\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},(0,i.kt)("inlineCode",{parentName:"p"},"env")," supports expansion and retrieving output from a shell command\njust like variables, as you can see in the ",(0,i.kt)("a",{parentName:"p",href:"#variables"},"Variables")," section.")),(0,i.kt)("h3",{id:"env-files"},".env files"),(0,i.kt)("p",null,"You can also ask Task to include ",(0,i.kt)("inlineCode",{parentName:"p"},".env")," like files by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"dotenv:"),"\nsetting:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash",metastring:'title=".env"',title:'".env"'},"KEYNAME=VALUE\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash",metastring:'title="testing/.env"',title:'"testing/.env"'},"ENDPOINT=testing.com\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="Taskfile.yml"',title:'"Taskfile.yml"'},"version: '3'\n\nenv:\n ENV: testing\n\ndotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']\n\ntasks:\n greet:\n cmds:\n - echo \"Using $KEYNAME and endpoint $ENDPOINT\"\n")),(0,i.kt)("p",null,"Dotenv files can also be specified at the task level:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nenv:\n ENV: testing\n\ntasks:\n greet:\n dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']\n cmds:\n - echo \"Using $KEYNAME and endpoint $ENDPOINT\"\n")),(0,i.kt)("p",null,"Environment variables specified explicitly at the task-level will override\nvariables defined in dotfiles:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nenv:\n ENV: testing\n\ntasks:\n greet:\n dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']\n env:\n KEYNAME: DIFFERENT_VALUE\n cmds:\n - echo \"Using $KEYNAME and endpoint $ENDPOINT\"\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Please note that you are not currently able to use the ",(0,i.kt)("inlineCode",{parentName:"p"},"dotenv")," key inside included Taskfiles.")),(0,i.kt)("h2",{id:"including-other-taskfiles"},"Including other Taskfiles"),(0,i.kt)("p",null,"If you want to share tasks between different projects (Taskfiles), you can use\nthe importing mechanism to include other Taskfiles using the ",(0,i.kt)("inlineCode",{parentName:"p"},"includes")," keyword:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n docs: ./documentation # will look for ./documentation/Taskfile.yml\n docker: ./DockerTasks.yml\n")),(0,i.kt)("p",null,"The tasks described in the given Taskfiles will be available with the informed\nnamespace. So, you'd call ",(0,i.kt)("inlineCode",{parentName:"p"},"task docs:serve")," to run the ",(0,i.kt)("inlineCode",{parentName:"p"},"serve")," task from\n",(0,i.kt)("inlineCode",{parentName:"p"},"documentation/Taskfile.yml")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"task docker:build")," to run the ",(0,i.kt)("inlineCode",{parentName:"p"},"build")," task\nfrom the ",(0,i.kt)("inlineCode",{parentName:"p"},"DockerTasks.yml")," file."),(0,i.kt)("p",null,"Relative paths are resolved relative to the directory containing the including Taskfile."),(0,i.kt)("h3",{id:"os-specific-taskfiles"},"OS-specific Taskfiles"),(0,i.kt)("p",null,"With ",(0,i.kt)("inlineCode",{parentName:"p"},"version: '2'"),", task automatically includes any ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_{{OS}}.yml"),"\nif it exists (for example: ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_windows.yml"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_linux.yml")," or\n",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_darwin.yml"),"). Since this behavior was a bit too implicit, it\nwas removed on version 3, but you still can have a similar behavior by\nexplicitly importing these files:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n build: ./Taskfile_{{OS}}.yml\n")),(0,i.kt)("h3",{id:"directory-of-included-taskfile"},"Directory of included Taskfile"),(0,i.kt)("p",null,"By default, included Taskfile's tasks are run in the current directory, even\nif the Taskfile is in another directory, but you can force its tasks to run\nin another directory by using this alternative syntax:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n docs:\n taskfile: ./docs/Taskfile.yml\n dir: ./docs\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The included Taskfiles must be using the same schema version as the main\nTaskfile uses.")),(0,i.kt)("h3",{id:"optional-includes"},"Optional includes"),(0,i.kt)("p",null,"Includes marked as optional will allow Task to continue execution as normal if\nthe included file is missing."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n tests:\n taskfile: ./tests/Taskfile.yml\n optional: true\n\ntasks:\n greet:\n cmds:\n - echo \"This command can still be successfully executed if ./tests/Taskfile.yml does not exist\"\n")),(0,i.kt)("h3",{id:"internal-includes"},"Internal includes"),(0,i.kt)("p",null,"Includes marked as internal will set all the tasks of the included file to be\ninternal as well (see the ",(0,i.kt)("a",{parentName:"p",href:"#internal-tasks"},"Internal tasks")," section below).\nThis is useful when including utility tasks that are not intended to be used\ndirectly by the user."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n tests:\n taskfile: ./taskfiles/Utils.yml\n internal: true\n")),(0,i.kt)("h3",{id:"vars-of-included-taskfiles"},"Vars of included Taskfiles"),(0,i.kt)("p",null,"You can also specify variables when including a Taskfile. This may be useful\nfor having reusable Taskfile that can be tweaked or even included more than once:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n backend:\n taskfile: ./taskfiles/Docker.yml\n vars:\n DOCKER_IMAGE: backend_image\n\n frontend:\n taskfile: ./taskfiles/Docker.yml\n vars:\n DOCKER_IMAGE: frontend_image\n")),(0,i.kt)("h3",{id:"namespace-aliases"},"Namespace aliases"),(0,i.kt)("p",null,"When including a Taskfile, you can give the namespace a list of ",(0,i.kt)("inlineCode",{parentName:"p"},"aliases"),".\nThis works in the same way as ",(0,i.kt)("a",{parentName:"p",href:"#task-aliases"},"task aliases")," and can be used\ntogether to create shorter and easier-to-type commands."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n generate:\n taskfile: ./taskfiles/Generate.yml\n aliases: [gen]\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Vars declared in the included Taskfile have preference over the\nvariables in the including Taskfile! If you want a variable in an included Taskfile to be overridable,\nuse the ",(0,i.kt)("a",{parentName:"p",href:"https://go-task.github.io/slim-sprig/defaults.html"},"default function"),":\n",(0,i.kt)("inlineCode",{parentName:"p"},"MY_VAR: '{{.MY_VAR | default \"my-default-value\"}}'"),".")),(0,i.kt)("h2",{id:"internal-tasks"},"Internal tasks"),(0,i.kt)("p",null,"Internal tasks are tasks that cannot be called directly by the user. They will\nnot appear in the output when running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --list|--list-all"),". Other tasks may\ncall internal tasks in the usual way. This is useful for creating reusable,\nfunction-like tasks that have no useful purpose on the command line."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-image-1:\n cmds:\n - task: build-image\n vars:\n DOCKER_IMAGE: image-1\n\n build-image:\n internal: true\n cmds:\n - docker build -t {{.DOCKER_IMAGE}} .\n")),(0,i.kt)("h2",{id:"task-directory"},"Task directory"),(0,i.kt)("p",null,"By default, tasks will be executed in the directory where the Taskfile is\nlocated. But you can easily make the task run in another folder, informing\n",(0,i.kt)("inlineCode",{parentName:"p"},"dir"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n serve:\n dir: public/www\n cmds:\n # run http server\n - caddy\n")),(0,i.kt)("p",null,"If the directory does not exist, ",(0,i.kt)("inlineCode",{parentName:"p"},"task")," creates it."),(0,i.kt)("h2",{id:"task-dependencies"},"Task dependencies"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Dependencies run in parallel, so dependencies of a task should not depend one\nanother. If you want to force tasks to run serially, take a look at the\n",(0,i.kt)("a",{parentName:"p",href:"#calling-another-task"},"Calling Another Task")," section below.")),(0,i.kt)("p",null,"You may have tasks that depend on others. Just pointing them on ",(0,i.kt)("inlineCode",{parentName:"p"},"deps")," will\nmake them run automatically before running the parent task:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n deps: [assets]\n cmds:\n - go build -v -i main.go\n\n assets:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"In the above example, ",(0,i.kt)("inlineCode",{parentName:"p"},"assets")," will always run right before ",(0,i.kt)("inlineCode",{parentName:"p"},"build")," if you run\n",(0,i.kt)("inlineCode",{parentName:"p"},"task build"),"."),(0,i.kt)("p",null,"A task can have only dependencies and no commands to group tasks together:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n assets:\n deps: [js, css]\n\n js:\n cmds:\n - minify -o public/script.js src/js\n\n css:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"If there is more than one dependency, they always run in parallel for better\nperformance."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"You can also make the tasks given by the command line run in parallel by\nusing the ",(0,i.kt)("inlineCode",{parentName:"p"},"--parallel")," flag (alias ",(0,i.kt)("inlineCode",{parentName:"p"},"-p"),"). Example: ",(0,i.kt)("inlineCode",{parentName:"p"},"task --parallel js css"),".")),(0,i.kt)("p",null,"If you want to pass information to dependencies, you can do that the same\nmanner as you would to ",(0,i.kt)("a",{parentName:"p",href:"#calling-another-task"},"call another task"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n default:\n deps:\n - task: echo_sth\n vars: {TEXT: "before 1"}\n - task: echo_sth\n vars: {TEXT: "before 2"}\n cmds:\n - echo "after"\n\n echo_sth:\n cmds:\n - echo {{.TEXT}}\n')),(0,i.kt)("h2",{id:"platform-specific-tasks-and-commands"},"Platform specific tasks and commands"),(0,i.kt)("p",null,"If you want to restrict the running of tasks to explicit platforms, this can be achieved\nusing the ",(0,i.kt)("inlineCode",{parentName:"p"},"platforms:")," key. Tasks can be restricted to a specific OS, architecture or a\ncombination of both.\nOn a mismatch, the task or command will be skipped, and no error will be thrown."),(0,i.kt)("p",null,"The values allowed as OS or Arch are valid ",(0,i.kt)("inlineCode",{parentName:"p"},"GOOS")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"GOARCH")," values, as\ndefined by the Go language\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/golang/go/blob/master/src/go/build/syslist.go"},"here"),"."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"build-windows")," task below will run only on Windows, and on any architecture:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-windows:\n platforms: [windows]\n cmds:\n - echo 'Running command on Windows'\n")),(0,i.kt)("p",null,"This can be restricted to a specific architecture as follows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-windows-amd64:\n platforms: [windows/amd64]\n cmds:\n - echo 'Running command on Windows (amd64)'\n")),(0,i.kt)("p",null,"It is also possible to restrict the task to specific architectures:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-amd64:\n platforms: [amd64]\n cmds:\n - echo 'Running command on amd64'\n")),(0,i.kt)("p",null,"Multiple platforms can be specified as follows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n platforms: [windows/amd64, darwin]\n cmds:\n - echo 'Running command on Windows (amd64) and macOS'\n")),(0,i.kt)("p",null,"Individual commands can also be restricted to specific platforms:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - cmd: echo 'Running command on Windows (amd64) and macOS'\n platforms: [windows/amd64, darwin]\n - cmd: echo 'Running on all platforms'\n")),(0,i.kt)("h2",{id:"calling-another-task"},"Calling another task"),(0,i.kt)("p",null,"When a task has many dependencies, they are executed concurrently. This will\noften result in a faster build pipeline. However, in some situations, you may need\nto call other tasks serially. In this case, use the following syntax:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n main-task:\n cmds:\n - task: task-to-be-called\n - task: another-task\n - echo "Both done"\n\n task-to-be-called:\n cmds:\n - echo "Task to be called"\n\n another-task:\n cmds:\n - echo "Another task"\n')),(0,i.kt)("p",null,"Overriding variables in the called task is as simple as informing ",(0,i.kt)("inlineCode",{parentName:"p"},"vars"),"\nattribute:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n greet:\n vars:\n RECIPIENT: \'{{default "World" .RECIPIENT}}\'\n cmds:\n - echo "Hello, {{.RECIPIENT}}!"\n\n greet-pessimistically:\n cmds:\n - task: greet\n vars: {RECIPIENT: "Cruel World"}\n')),(0,i.kt)("p",null,"The above syntax is also supported in ",(0,i.kt)("inlineCode",{parentName:"p"},"deps"),"."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"NOTE: If you want to call a task declared in the root Taskfile from within an\n",(0,i.kt)("a",{parentName:"p",href:"#including-other-taskfiles"},"included Taskfile"),", add a leading ",(0,i.kt)("inlineCode",{parentName:"p"},":")," like this:\n",(0,i.kt)("inlineCode",{parentName:"p"},"task: :task-name"),".")),(0,i.kt)("h2",{id:"prevent-unnecessary-work"},"Prevent unnecessary work"),(0,i.kt)("h3",{id:"by-fingerprinting-locally-generated-files-and-their-sources"},"By fingerprinting locally generated files and their sources"),(0,i.kt)("p",null,"If a task generates something, you can inform Task the source and generated\nfiles, so Task will prevent running them if not necessary."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n deps: [js, css]\n cmds:\n - go build -v -i main.go\n\n js:\n cmds:\n - minify -o public/script.js src/js\n sources:\n - src/js/**/*.js\n generates:\n - public/script.js\n\n css:\n cmds:\n - minify -o public/style.css src/css\n sources:\n - src/css/**/*.css\n generates:\n - public/style.css\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"sources")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"generates")," can be files or file patterns. When given,\nTask will compare the checksum of the source files to determine if it's\nnecessary to run the task. If not, it will just print a message like\n",(0,i.kt)("inlineCode",{parentName:"p"},'Task "js" is up to date'),"."),(0,i.kt)("p",null,"If you prefer this check to be made by the modification timestamp of the files,\ninstead of its checksum (content), just set the ",(0,i.kt)("inlineCode",{parentName:"p"},"method")," property to ",(0,i.kt)("inlineCode",{parentName:"p"},"timestamp"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - go build .\n sources:\n - ./*.go\n generates:\n - app{{exeExt}}\n method: timestamp\n")),(0,i.kt)("p",null,"In situations where you need more flexibility the ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," keyword can be used.\nYou can even combine the two. See the documentation for\n",(0,i.kt)("a",{parentName:"p",href:"#using-programmatic-checks-to-indicate-a-task-is-up-to-date"},"status")," for an\nexample."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"By default, task stores checksums on a local ",(0,i.kt)("inlineCode",{parentName:"p"},".task")," directory in the project's\ndirectory. Most of the time, you'll want to have this directory on ",(0,i.kt)("inlineCode",{parentName:"p"},".gitignore"),"\n(or equivalent) so it isn't committed. (If you have a task for code generation\nthat is committed it may make sense to commit the checksum of that task as\nwell, though)."),(0,i.kt)("p",{parentName:"admonition"},"If you want these files to be stored in another directory, you can set a\n",(0,i.kt)("inlineCode",{parentName:"p"},"TASK_TEMP_DIR")," environment variable in your machine. It can contain a relative\npath like ",(0,i.kt)("inlineCode",{parentName:"p"},"tmp/task")," that will be interpreted as relative to the project\ndirectory, or an absolute or home path like ",(0,i.kt)("inlineCode",{parentName:"p"},"/tmp/.task")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"~/.task"),"\n(subdirectories will be created for each project)."),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"export TASK_TEMP_DIR='~/.task'\n"))),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Each task has only one checksum stored for its ",(0,i.kt)("inlineCode",{parentName:"p"},"sources"),". If you want\nto distinguish a task by any of its input variables, you can add those\nvariables as part of the task's label, and it will be considered a different\ntask."),(0,i.kt)("p",{parentName:"admonition"},"This is useful if you want to run a task once for each distinct set of\ninputs until the sources actually change. For example, if the sources depend\non the value of a variable, or you if you want the task to rerun if some arguments\nchange even if the source has not.")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The method ",(0,i.kt)("inlineCode",{parentName:"p"},"none")," skips any validation and always run the task.")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"For the ",(0,i.kt)("inlineCode",{parentName:"p"},"checksum")," (default) method to work, it is only necessary to\ninform the source files, but if you want to use the ",(0,i.kt)("inlineCode",{parentName:"p"},"timestamp")," method, you\nalso need to inform the generated files with ",(0,i.kt)("inlineCode",{parentName:"p"},"generates"),".")),(0,i.kt)("h3",{id:"using-programmatic-checks-to-indicate-a-task-is-up-to-date"},"Using programmatic checks to indicate a task is up to date."),(0,i.kt)("p",null,"Alternatively, you can inform a sequence of tests as ",(0,i.kt)("inlineCode",{parentName:"p"},"status"),". If no error\nis returned (exit status 0), the task is considered up-to-date:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n generate-files:\n cmds:\n - mkdir directory\n - touch directory/file1.txt\n - touch directory/file2.txt\n # test existence of files\n status:\n - test -d directory\n - test -f directory/file1.txt\n - test -f directory/file2.txt\n")),(0,i.kt)("p",null,"Normally, you would use ",(0,i.kt)("inlineCode",{parentName:"p"},"sources")," in combination with\n",(0,i.kt)("inlineCode",{parentName:"p"},"generates")," - but for tasks that generate remote artifacts (Docker images,\ndeploys, CD releases) the checksum source and timestamps require either\naccess to the artifact or for an out-of-band refresh of the ",(0,i.kt)("inlineCode",{parentName:"p"},".checksum"),"\nfingerprint file."),(0,i.kt)("p",null,"Two special variables ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.CHECKSUM}}")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.TIMESTAMP}}")," are available\nfor interpolation within ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," commands, depending on the method assigned\nto fingerprint the sources. Only ",(0,i.kt)("inlineCode",{parentName:"p"},"source")," globs are fingerprinted."),(0,i.kt)("p",null,"Note that the ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.TIMESTAMP}}"),' variable is a "live" Go ',(0,i.kt)("inlineCode",{parentName:"p"},"time.Time")," struct, and\ncan be formatted using any of the methods that ",(0,i.kt)("inlineCode",{parentName:"p"},"time.Time")," responds to."),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/pkg/time/"},"the Go Time documentation")," for more information."),(0,i.kt)("p",null,"You can use ",(0,i.kt)("inlineCode",{parentName:"p"},"--force")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"-f")," if you want to force a task to run even when\nup-to-date."),(0,i.kt)("p",null,"Also, ",(0,i.kt)("inlineCode",{parentName:"p"},"task --status [tasks]...")," will exit with a non-zero exit code if any of\nthe tasks are not up-to-date."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"status")," can be combined with the ",(0,i.kt)("a",{parentName:"p",href:"#by-fingerprinting-locally-generated-files-and-their-sources"},"fingerprinting"),"\nto have a task run if either the the source/generated artifacts changes, or the\nprogrammatic check fails:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:prod:\n desc: Build for production usage.\n cmds:\n - composer install\n # Run this task if source files changes.\n sources:\n - composer.json\n - composer.lock\n generates:\n - ./vendor/composer/installed.json\n - ./vendor/autoload.php\n # But also run the task if the last build was not a production build.\n status:\n - grep -q '\"dev\": false' ./vendor/composer/installed.json\n")),(0,i.kt)("h3",{id:"using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies"},"Using programmatic checks to cancel the execution of a task and its dependencies"),(0,i.kt)("p",null,"In addition to ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," checks, ",(0,i.kt)("inlineCode",{parentName:"p"},"preconditions")," checks are\nthe logical inverse of ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," checks. That is, if you need a certain set of\nconditions to be ",(0,i.kt)("em",{parentName:"p"},"true")," you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"preconditions")," stanza.\n",(0,i.kt)("inlineCode",{parentName:"p"},"preconditions")," are similar to ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," lines, except they support ",(0,i.kt)("inlineCode",{parentName:"p"},"sh"),"\nexpansion, and they SHOULD all return 0."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n generate-files:\n cmds:\n - mkdir directory\n - touch directory/file1.txt\n - touch directory/file2.txt\n # test existence of files\n preconditions:\n - test -f .env\n - sh: "[ 1 = 0 ]"\n msg: "One doesn\'t equal Zero, Halting"\n')),(0,i.kt)("p",null,"Preconditions can set specific failure messages that can tell\na user what steps to take using the ",(0,i.kt)("inlineCode",{parentName:"p"},"msg")," field."),(0,i.kt)("p",null,"If a task has a dependency on a sub-task with a precondition, and that\nprecondition is not met - the calling task will fail. Note that a task\nexecuted with a failing precondition will not run unless ",(0,i.kt)("inlineCode",{parentName:"p"},"--force")," is\ngiven."),(0,i.kt)("p",null,"Unlike ",(0,i.kt)("inlineCode",{parentName:"p"},"status"),", which will skip a task if it is up to date and continue\nexecuting tasks that depend on it, a ",(0,i.kt)("inlineCode",{parentName:"p"},"precondition")," will fail a task, along\nwith any other tasks that depend on it."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n task-will-fail:\n preconditions:\n - sh: "exit 1"\n\n task-will-also-fail:\n deps:\n - task-will-fail\n\n task-will-still-fail:\n cmds:\n - task: task-will-fail\n - echo "I will not run"\n')),(0,i.kt)("h3",{id:"limiting-when-tasks-run"},"Limiting when tasks run"),(0,i.kt)("p",null,"If a task executed by multiple ",(0,i.kt)("inlineCode",{parentName:"p"},"cmds")," or multiple ",(0,i.kt)("inlineCode",{parentName:"p"},"deps")," you can control\nwhen it is executed using ",(0,i.kt)("inlineCode",{parentName:"p"},"run"),". ",(0,i.kt)("inlineCode",{parentName:"p"},"run")," can also be set at the root\nof the Taskfile to change the behavior of all the tasks unless explicitly\noverridden."),(0,i.kt)("p",null,"Supported values for ",(0,i.kt)("inlineCode",{parentName:"p"},"run"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"always")," (default) always attempt to invoke the task regardless of the\nnumber of previous executions"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"once")," only invoke this task once regardless of the number of references"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"when_changed")," only invokes the task once for each unique set of variables\npassed into the task")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - task: generate-file\n vars: { CONTENT: '1' }\n - task: generate-file\n vars: { CONTENT: '2' }\n - task: generate-file\n vars: { CONTENT: '2' }\n\n generate-file:\n run: when_changed\n deps:\n - install-deps\n cmds:\n - echo {{.CONTENT}}\n\n install-deps:\n run: once\n cmds:\n - sleep 5 # long operation like installing packages\n")),(0,i.kt)("h2",{id:"variables"},"Variables"),(0,i.kt)("p",null,"When doing interpolation of variables, Task will look for the below.\nThey are listed below in order of importance (i.e. most important first):"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Variables declared in the task definition"),(0,i.kt)("li",{parentName:"ul"},"Variables given while calling a task from another\n(See ",(0,i.kt)("a",{parentName:"li",href:"#calling-another-task"},"Calling another task")," above)"),(0,i.kt)("li",{parentName:"ul"},"Variables of the ",(0,i.kt)("a",{parentName:"li",href:"#including-other-taskfiles"},"included Taskfile")," (when the task is included)"),(0,i.kt)("li",{parentName:"ul"},"Variables of the ",(0,i.kt)("a",{parentName:"li",href:"#vars-of-included-taskfiles"},"inclusion of the Taskfile")," (when the task is included)"),(0,i.kt)("li",{parentName:"ul"},"Global variables (those declared in the ",(0,i.kt)("inlineCode",{parentName:"li"},"vars:")," option in the Taskfile)"),(0,i.kt)("li",{parentName:"ul"},"Environment variables")),(0,i.kt)("p",null,"Example of sending parameters with environment variables:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ TASK_VARIABLE=a-value task do-something\n")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"A special variable ",(0,i.kt)("inlineCode",{parentName:"p"},".TASK")," is always available containing the task name.")),(0,i.kt)("p",null,"Since some shells do not support the above syntax to set environment variables\n(Windows) tasks also accept a similar style when not at the beginning of\nthe command."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},'$ task write-file FILE=file.txt "CONTENT=Hello, World!" print "MESSAGE=All done!"\n')),(0,i.kt)("p",null,"Example of locally declared vars:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print-var:\n cmds:\n - echo \"{{.VAR}}\"\n vars:\n VAR: Hello!\n")),(0,i.kt)("p",null,"Example of global vars in a ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nvars:\n GREETING: Hello from Taskfile!\n\ntasks:\n greet:\n cmds:\n - echo \"{{.GREETING}}\"\n")),(0,i.kt)("h3",{id:"dynamic-variables"},"Dynamic variables"),(0,i.kt)("p",null,"The below syntax (",(0,i.kt)("inlineCode",{parentName:"p"},"sh:")," prop in a variable) is considered a dynamic variable.\nThe value will be treated as a command and the output assigned. If there are one\nor more trailing newlines, the last newline will be trimmed."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - go build -ldflags=\"-X main.Version={{.GIT_COMMIT}}\" main.go\n vars:\n GIT_COMMIT:\n sh: git log -n 1 --format=%h\n")),(0,i.kt)("p",null,"This works for all types of variables."),(0,i.kt)("h2",{id:"forwarding-cli-arguments-to-commands"},"Forwarding CLI arguments to commands"),(0,i.kt)("p",null,"If ",(0,i.kt)("inlineCode",{parentName:"p"},"--")," is given in the CLI, all following parameters are added to a\nspecial ",(0,i.kt)("inlineCode",{parentName:"p"},".CLI_ARGS")," variable. This is useful to forward arguments to another\ncommand."),(0,i.kt)("p",null,"The below example will run ",(0,i.kt)("inlineCode",{parentName:"p"},"yarn install"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ task yarn -- install\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n yarn:\n cmds:\n - yarn {{.CLI_ARGS}}\n")),(0,i.kt)("h2",{id:"doing-task-cleanup-with-defer"},"Doing task cleanup with ",(0,i.kt)("inlineCode",{parentName:"h2"},"defer")),(0,i.kt)("p",null,"With the ",(0,i.kt)("inlineCode",{parentName:"p"},"defer")," keyword, it's possible to schedule cleanup to be run once\nthe task finishes. The difference with just putting it as the last command is\nthat this command will run even when the task fails."),(0,i.kt)("p",null,"In the example below, ",(0,i.kt)("inlineCode",{parentName:"p"},"rm -rf tmpdir/")," will run even if the third command fails:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - mkdir -p tmpdir/\n - defer: rm -rf tmpdir/\n - echo 'Do work on tmpdir/'\n")),(0,i.kt)("p",null,"If you want to move the cleanup command into another task, that is possible as\nwell:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - mkdir -p tmpdir/\n - defer: { task: cleanup }\n - echo 'Do work on tmpdir/'\n\n cleanup: rm -rf tmpdir/\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Due to the nature of how the\n",(0,i.kt)("a",{parentName:"p",href:"https://go.dev/tour/flowcontrol/13"},"Go's own ",(0,i.kt)("inlineCode",{parentName:"a"},"defer")," work"),", the deferred\ncommands are executed in the reverse order if you schedule multiple of them.")),(0,i.kt)("h2",{id:"gos-template-engine"},"Go's template engine"),(0,i.kt)("p",null,"Task parse commands as ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/pkg/text/template/"},"Go's template engine")," before executing\nthem. Variables are accessible through dot syntax (",(0,i.kt)("inlineCode",{parentName:"p"},".VARNAME"),")."),(0,i.kt)("p",null,"All functions by the Go's ",(0,i.kt)("a",{parentName:"p",href:"https://go-task.github.io/slim-sprig/"},"slim-sprig lib"),"\nare available. The following example gets the current date in a given format:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print-date:\n cmds:\n - echo {{now | date \"2006-01-02\"}}\n")),(0,i.kt)("p",null,"Task also adds the following functions:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"OS"),': Returns the operating system. Possible values are "windows", "linux",\n"darwin" (macOS) and "freebsd".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ARCH"),': return the architecture Task was compiled to: "386", "amd64", "arm"\nor "s390x".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"splitLines"),": Splits Unix (\\n) and Windows (\\r\\n) styled newlines."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"catLines"),": Replaces Unix (\\n) and Windows (\\r\\n) styled newlines with a space."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"toSlash"),": Does nothing on Unix, but on Windows converts a string from ",(0,i.kt)("inlineCode",{parentName:"li"},"\\"),"\npath format to ",(0,i.kt)("inlineCode",{parentName:"li"},"/"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fromSlash"),": Opposite of ",(0,i.kt)("inlineCode",{parentName:"li"},"toSlash"),". Does nothing on Unix, but on Windows\nconverts a string from ",(0,i.kt)("inlineCode",{parentName:"li"},"/")," path format to ",(0,i.kt)("inlineCode",{parentName:"li"},"\\"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"exeExt"),": Returns the right executable extension for the current OS\n(",(0,i.kt)("inlineCode",{parentName:"li"},'".exe"')," for Windows, ",(0,i.kt)("inlineCode",{parentName:"li"},'""')," for others)."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shellQuote"),": Quotes a string to make it safe for use in shell scripts.\nTask uses ",(0,i.kt)("a",{parentName:"li",href:"https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote"},"this Go function"),"\nfor this. The Bash dialect is assumed.")),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print-os:\n cmds:\n - echo '{{OS}} {{ARCH}}'\n - echo '{{if eq OS \"windows\"}}windows-command{{else}}unix-command{{end}}'\n # This will be path/to/file on Unix but path\\to\\file on Windows\n - echo '{{fromSlash \"path/to/file\"}}'\n enumerated-file:\n vars:\n CONTENT: |\n foo\n bar\n cmds:\n - |\n cat << EOF > output.txt\n {{range $i, $line := .CONTENT | splitLines -}}\n {{printf \"%3d\" $i}}: {{$line}}\n {{end}}EOF\n")),(0,i.kt)("h2",{id:"help"},"Help"),(0,i.kt)("p",null,"Running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --list")," (or ",(0,i.kt)("inlineCode",{parentName:"p"},"task -l"),") lists all tasks with a description.\nThe following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n desc: Build the go binary.\n cmds:\n - go build -v -i main.go\n\n test:\n desc: Run all the go tests.\n cmds:\n - go test -race ./...\n\n js:\n cmds:\n - minify -o public/script.js src/js\n\n css:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"would print the following output:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"* build: Build the go binary.\n* test: Run all the go tests.\n")),(0,i.kt)("p",null,"If you want to see all tasks, there's a ",(0,i.kt)("inlineCode",{parentName:"p"},"--list-all")," (alias ",(0,i.kt)("inlineCode",{parentName:"p"},"-a"),") flag as well."),(0,i.kt)("h2",{id:"display-summary-of-task"},"Display summary of task"),(0,i.kt)("p",null,"Running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --summary task-name")," will show a summary of a task.\nThe following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n release:\n deps: [build]\n summary: |\n Release your project to github\n\n It will build your project before starting the release.\n Please make sure that you have set GITHUB_TOKEN before starting.\n cmds:\n - your-release-tool\n\n build:\n cmds:\n - your-build-tool\n")),(0,i.kt)("p",null,"with running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --summary release")," would print the following output:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"task: release\n\nRelease your project to github\n\nIt will build your project before starting the release.\nPlease make sure that you have set GITHUB_TOKEN before starting.\n\ndependencies:\n - build\n\ncommands:\n - your-release-tool\n")),(0,i.kt)("p",null,"If a summary is missing, the description will be printed.\nIf the task does not have a summary or a description, a warning is printed."),(0,i.kt)("p",null,"Please note: ",(0,i.kt)("em",{parentName:"p"},"showing the summary will not execute the command"),"."),(0,i.kt)("h2",{id:"task-aliases"},"Task aliases"),(0,i.kt)("p",null,"Aliases are alternative names for tasks. They can be used to make it easier and\nquicker to run tasks with long or hard-to-type names. You can use them on the\ncommand line, when ",(0,i.kt)("a",{parentName:"p",href:"#calling-another-task"},"calling sub-tasks")," in your Taskfile\nand when ",(0,i.kt)("a",{parentName:"p",href:"#including-other-taskfiles"},"including tasks")," with aliases from another\nTaskfile. They can also be used together with ",(0,i.kt)("a",{parentName:"p",href:"#namespace-aliases"},"namespace\naliases"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n generate:\n aliases: [gen]\n cmds:\n - task: gen-mocks\n\n generate-mocks:\n aliases: [gen-mocks]\n cmds:\n - echo \"generating...\"\n")),(0,i.kt)("h2",{id:"overriding-task-name"},"Overriding task name"),(0,i.kt)("p",null,"Sometimes you may want to override the task name printed on the summary, up-to-date\nmessages to STDOUT, etc. In this case, you can just set ",(0,i.kt)("inlineCode",{parentName:"p"},"label:"),", which can also\nbe interpolated with variables:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n - task: print\n vars:\n MESSAGE: hello\n - task: print\n vars:\n MESSAGE: world\n\n print:\n label: 'print-{{.MESSAGE}}'\n cmds:\n - echo \"{{.MESSAGE}}\"\n")),(0,i.kt)("h2",{id:"silent-mode"},"Silent mode"),(0,i.kt)("p",null,"Silent mode disables the echoing of commands before Task runs it.\nFor the following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - echo \"Print something\"\n")),(0,i.kt)("p",null,"Normally this will be printed:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},'echo "Print something"\nPrint something\n')),(0,i.kt)("p",null,"With silent mode on, the below will be printed instead:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"Print something\n")),(0,i.kt)("p",null,"There are four ways to enable silent mode:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"At command level:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - cmd: echo \"Print something\"\n silent: true\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"At task level:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - echo \"Print something\"\n silent: true\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Globally at Taskfile level:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nsilent: true\n\ntasks:\n echo:\n cmds:\n - echo \"Print something\"\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Or globally with ",(0,i.kt)("inlineCode",{parentName:"li"},"--silent")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"-s")," flag")),(0,i.kt)("p",null,"If you want to suppress STDOUT instead, just redirect a command to ",(0,i.kt)("inlineCode",{parentName:"p"},"/dev/null"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - echo \"This will print nothing\" > /dev/null\n")),(0,i.kt)("h2",{id:"dry-run-mode"},"Dry run mode"),(0,i.kt)("p",null,"Dry run mode (",(0,i.kt)("inlineCode",{parentName:"p"},"--dry"),") compiles and steps through each task, printing the commands\nthat would be run without executing them. This is useful for debugging your Taskfiles."),(0,i.kt)("h2",{id:"ignore-errors"},"Ignore errors"),(0,i.kt)("p",null,"You have the option to ignore errors during command execution.\nGiven the following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - exit 1\n - echo \"Hello World\"\n")),(0,i.kt)("p",null,"Task will abort the execution after running ",(0,i.kt)("inlineCode",{parentName:"p"},"exit 1")," because the status code ",(0,i.kt)("inlineCode",{parentName:"p"},"1")," stands for ",(0,i.kt)("inlineCode",{parentName:"p"},"EXIT_FAILURE"),".\nHowever, it is possible to continue with execution using ",(0,i.kt)("inlineCode",{parentName:"p"},"ignore_error"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - cmd: exit 1\n ignore_error: true\n - echo \"Hello World\"\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"ignore_error")," can also be set for a task, which means errors will be suppressed\nfor all commands. Nevertheless, keep in mind that this option will not propagate to other tasks\ncalled either by ",(0,i.kt)("inlineCode",{parentName:"p"},"deps")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"cmds"),"!"),(0,i.kt)("h2",{id:"output-syntax"},"Output syntax"),(0,i.kt)("p",null,"By default, Task just redirects the STDOUT and STDERR of the running commands\nto the shell in real-time. This is good for having live feedback for logging\nprinted by commands, but the output can become messy if you have multiple\ncommands running simultaneously and printing lots of stuff."),(0,i.kt)("p",null,"To make this more customizable, there are currently three different output\noptions you can choose:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"interleaved")," (default)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"group")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"prefixed"))),(0,i.kt)("p",null,"To choose another one, just set it to root in the Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\noutput: 'group'\n\ntasks:\n # ...\n")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"group")," output will print the entire output of a command once after it\nfinishes, so you will not have live feedback for commands that take a long time\nto run."),(0,i.kt)("p",null,"When using the ",(0,i.kt)("inlineCode",{parentName:"p"},"group")," output, you can optionally provide a templated message\nto print at the start and end of the group. This can be useful for instructing\nCI systems to group all of the output for a given task, such as with\n",(0,i.kt)("a",{parentName:"p",href:"https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#grouping-log-lines"},"GitHub Actions' ",(0,i.kt)("inlineCode",{parentName:"a"},"::group::")," command"),"\nor ",(0,i.kt)("a",{parentName:"p",href:"https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?expand=1&view=azure-devops&tabs=bash#formatting-commands"},"Azure Pipelines"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\noutput:\n group:\n begin: '::group::{{.TASK}}'\n end: '::endgroup::'\n\ntasks:\n default:\n cmds:\n - echo 'Hello, World!'\n silent: true\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ task default\n::group::default\nHello, World!\n::endgroup::\n")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"prefix")," output will prefix every line printed by a command with\n",(0,i.kt)("inlineCode",{parentName:"p"},"[task-name] ")," as the prefix, but you can customize the prefix for a command\nwith the ",(0,i.kt)("inlineCode",{parentName:"p"},"prefix:")," attribute:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\noutput: prefixed\n\ntasks:\n default:\n deps:\n - task: print\n vars: {TEXT: foo}\n - task: print\n vars: {TEXT: bar}\n - task: print\n vars: {TEXT: baz}\n\n print:\n cmds:\n - echo "{{.TEXT}}"\n prefix: "print-{{.TEXT}}"\n silent: true\n')),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ task default\n[print-foo] foo\n[print-bar] bar\n[print-baz] baz\n")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The ",(0,i.kt)("inlineCode",{parentName:"p"},"output")," option can also be specified by the ",(0,i.kt)("inlineCode",{parentName:"p"},"--output")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"-o")," flags.")),(0,i.kt)("h2",{id:"interactive-cli-application"},"Interactive CLI application"),(0,i.kt)("p",null,"When running interactive CLI applications inside Task they can sometimes behave\nweirdly, especially when the ",(0,i.kt)("a",{parentName:"p",href:"#output-syntax"},"output mode")," is set to something\nother than ",(0,i.kt)("inlineCode",{parentName:"p"},"interleaved")," (the default), or when interactive apps are run in\nparallel with other tasks."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"interactive: true")," tells Task this is an interactive application and Task\nwill try to optimize for it:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - vim my-file.txt\n interactive: true\n")),(0,i.kt)("p",null,"If you still have problems running an interactive app through Task, please open\nan issue about it."),(0,i.kt)("h2",{id:"short-task-syntax"},"Short task syntax"),(0,i.kt)("p",null,"Starting on Task v3, you can now write tasks with a shorter syntax if they\nhave the default settings (e.g. no custom ",(0,i.kt)("inlineCode",{parentName:"p"},"env:"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"vars:"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"desc:"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"silent:")," , etc):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build: go build -v -o ./app{{exeExt}} .\n\n run:\n - task: build\n - ./app{{exeExt}} -h localhost -p 8080\n")),(0,i.kt)("h2",{id:"set-and-shopt"},(0,i.kt)("inlineCode",{parentName:"h2"},"set")," and ",(0,i.kt)("inlineCode",{parentName:"h2"},"shopt")),(0,i.kt)("p",null,"It's possible to specify options to the\n",(0,i.kt)("a",{parentName:"p",href:"https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html"},(0,i.kt)("inlineCode",{parentName:"a"},"set")),"\nand ",(0,i.kt)("a",{parentName:"p",href:"https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html"},(0,i.kt)("inlineCode",{parentName:"a"},"shopt")),"\nbuiltins. This can be added at global, task or command level."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nset: [pipefail]\nshopt: [globstar]\n\ntasks:\n # `globstar` required for double star globs to work\n default: echo **/*.go\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Keep in mind that not all options are available in the\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/mvdan/sh"},"shell interpreter library")," that Task uses.")),(0,i.kt)("h2",{id:"watch-tasks"},"Watch tasks"),(0,i.kt)("p",null,"With the flags ",(0,i.kt)("inlineCode",{parentName:"p"},"--watch")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"-w")," task will watch for file changes\nand run the task again. This requires the ",(0,i.kt)("inlineCode",{parentName:"p"},"sources")," attribute to be given,\nso task knows which files to watch."),(0,i.kt)("p",null,"The default watch interval is 5 seconds, but it's possible to change it by\neither setting ",(0,i.kt)("inlineCode",{parentName:"p"},"interval: '500ms'")," in the root of the Taskfile passing it\nas an argument like ",(0,i.kt)("inlineCode",{parentName:"p"},"--interval=500ms"),"."))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[]).push([[827],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return k}});var a=t(7294);function i(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 s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function o(e,n){if(null==e)return{};var t,a,i=function(e,n){if(null==e)return{};var t,a,i={},l=Object.keys(e);for(a=0;a<l.length;a++)t=l[a],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)t=l[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var r=a.createContext({}),p=function(e){var n=a.useContext(r),t=n;return e&&(t="function"==typeof e?e(n):s(s({},n),e)),t},d=function(e){var n=p(e.components);return a.createElement(r.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},c=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,l=e.originalType,r=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),m=p(t),c=i,k=m["".concat(r,".").concat(c)]||m[c]||u[c]||l;return t?a.createElement(k,s(s({ref:n},d),{},{components:t})):a.createElement(k,s({ref:n},d))}));function k(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var l=t.length,s=new Array(l);s[0]=c;var o={};for(var r in n)hasOwnProperty.call(n,r)&&(o[r]=n[r]);o.originalType=e,o[m]="string"==typeof e?e:i,s[1]=o;for(var p=2;p<l;p++)s[p]=t[p];return a.createElement.apply(null,s)}return a.createElement.apply(null,t)}c.displayName="MDXCreateElement"},2175:function(e,n,t){t.r(n),t.d(n,{assets:function(){return r},contentTitle:function(){return s},default:function(){return m},frontMatter:function(){return l},metadata:function(){return o},toc:function(){return p}});var a=t(3117),i=(t(7294),t(3905));const l={slug:"/usage/",sidebar_position:3},s="Usage",o={unversionedId:"usage",id:"usage",title:"Usage",description:"Getting started",source:"@site/docs/usage.md",sourceDirName:".",slug:"/usage/",permalink:"/usage/",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{slug:"/usage/",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Installation",permalink:"/installation/"},next:{title:"API Reference",permalink:"/api/"}},r={},p=[{value:"Getting started",id:"getting-started",level:2},{value:"Supported file names",id:"supported-file-names",level:2},{value:"Running a Taskfile from a subdirectory",id:"running-a-taskfile-from-a-subdirectory",level:3},{value:"Environment variables",id:"environment-variables",level:2},{value:"Task",id:"task",level:3},{value:".env files",id:"env-files",level:3},{value:"Including other Taskfiles",id:"including-other-taskfiles",level:2},{value:"OS-specific Taskfiles",id:"os-specific-taskfiles",level:3},{value:"Directory of included Taskfile",id:"directory-of-included-taskfile",level:3},{value:"Optional includes",id:"optional-includes",level:3},{value:"Internal includes",id:"internal-includes",level:3},{value:"Vars of included Taskfiles",id:"vars-of-included-taskfiles",level:3},{value:"Namespace aliases",id:"namespace-aliases",level:3},{value:"Internal tasks",id:"internal-tasks",level:2},{value:"Task directory",id:"task-directory",level:2},{value:"Task dependencies",id:"task-dependencies",level:2},{value:"Platform specific tasks and commands",id:"platform-specific-tasks-and-commands",level:2},{value:"Calling another task",id:"calling-another-task",level:2},{value:"Prevent unnecessary work",id:"prevent-unnecessary-work",level:2},{value:"By fingerprinting locally generated files and their sources",id:"by-fingerprinting-locally-generated-files-and-their-sources",level:3},{value:"Using programmatic checks to indicate a task is up to date.",id:"using-programmatic-checks-to-indicate-a-task-is-up-to-date",level:3},{value:"Using programmatic checks to cancel the execution of a task and its dependencies",id:"using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies",level:3},{value:"Limiting when tasks run",id:"limiting-when-tasks-run",level:3},{value:"Variables",id:"variables",level:2},{value:"Dynamic variables",id:"dynamic-variables",level:3},{value:"Forwarding CLI arguments to commands",id:"forwarding-cli-arguments-to-commands",level:2},{value:"Doing task cleanup with <code>defer</code>",id:"doing-task-cleanup-with-defer",level:2},{value:"Go's template engine",id:"gos-template-engine",level:2},{value:"Help",id:"help",level:2},{value:"Display summary of task",id:"display-summary-of-task",level:2},{value:"Task aliases",id:"task-aliases",level:2},{value:"Overriding task name",id:"overriding-task-name",level:2},{value:"Silent mode",id:"silent-mode",level:2},{value:"Dry run mode",id:"dry-run-mode",level:2},{value:"Ignore errors",id:"ignore-errors",level:2},{value:"Output syntax",id:"output-syntax",level:2},{value:"Interactive CLI application",id:"interactive-cli-application",level:2},{value:"Short task syntax",id:"short-task-syntax",level:2},{value:"<code>set</code> and <code>shopt</code>",id:"set-and-shopt",level:2},{value:"Watch tasks",id:"watch-tasks",level:2}],d={toc:p};function m(e){let{components:n,...t}=e;return(0,i.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"usage"},"Usage"),(0,i.kt)("h2",{id:"getting-started"},"Getting started"),(0,i.kt)("p",null,"Create a file called ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml")," in the root of your project.\nThe ",(0,i.kt)("inlineCode",{parentName:"p"},"cmds")," attribute should contain the commands of a task.\nThe example below allows compiling a Go app and uses ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/tdewolff/minify/tree/master/cmd/minify"},"Minify")," to concat\nand minify multiple CSS files into a single one."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - go build -v -i main.go\n\n assets:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"Running the tasks is as simple as running:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"task assets build\n")),(0,i.kt)("p",null,"Task uses ",(0,i.kt)("a",{parentName:"p",href:"https://mvdan.cc/sh/"},"mvdan.cc/sh"),", a native Go sh\ninterpreter. So you can write sh/bash commands, and it will work even on\nWindows, where ",(0,i.kt)("inlineCode",{parentName:"p"},"sh")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"bash")," are usually not available. Just remember any\nexecutable called must be available by the OS or in PATH."),(0,i.kt)("p",null,'If you omit a task name, "default" will be assumed.'),(0,i.kt)("h2",{id:"supported-file-names"},"Supported file names"),(0,i.kt)("p",null,"Task will look for the following file names, in order of priority:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Taskfile.yml"),(0,i.kt)("li",{parentName:"ul"},"Taskfile.yaml"),(0,i.kt)("li",{parentName:"ul"},"Taskfile.dist.yml"),(0,i.kt)("li",{parentName:"ul"},"Taskfile.dist.yaml")),(0,i.kt)("p",null,"The intention of having the ",(0,i.kt)("inlineCode",{parentName:"p"},".dist")," variants is to allow projects to have one\ncommitted version (",(0,i.kt)("inlineCode",{parentName:"p"},".dist"),") while still allowing individual users to override\nthe Taskfile by adding an additional ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml")," (which would be on\n",(0,i.kt)("inlineCode",{parentName:"p"},".gitignore"),")."),(0,i.kt)("h3",{id:"running-a-taskfile-from-a-subdirectory"},"Running a Taskfile from a subdirectory"),(0,i.kt)("p",null,"If a Taskfile cannot be found in the current working directory, it will walk up\nthe file tree until it finds one (similar to how ",(0,i.kt)("inlineCode",{parentName:"p"},"git")," works). When running Task\nfrom a subdirectory like this, it will behave as if you ran it from the\ndirectory containing the Taskfile."),(0,i.kt)("p",null,"You can use this functionality along with the special ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.USER_WORKING_DIR}}"),"\nvariable to create some very useful reusable tasks. For example, if you have a\nmonorepo with directories for each microservice, you can ",(0,i.kt)("inlineCode",{parentName:"p"},"cd")," into a\nmicroservice directory and run a task command to bring it up without having to\ncreate multiple tasks or Taskfiles with identical content. For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n up:\n dir: '{{.USER_WORKING_DIR}}'\n preconditions:\n - test -f docker-compose.yml\n cmds:\n - docker-compose up -d\n")),(0,i.kt)("p",null,"In this example, we can run ",(0,i.kt)("inlineCode",{parentName:"p"},"cd <service>")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"task up")," and as long as the\n",(0,i.kt)("inlineCode",{parentName:"p"},"<service>")," directory contains a ",(0,i.kt)("inlineCode",{parentName:"p"},"docker-compose.yml"),", the Docker composition will be\nbrought up."),(0,i.kt)("h2",{id:"environment-variables"},"Environment variables"),(0,i.kt)("h3",{id:"task"},"Task"),(0,i.kt)("p",null,"You can use ",(0,i.kt)("inlineCode",{parentName:"p"},"env")," to set custom environment variables for a specific task:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n greet:\n cmds:\n - echo $GREETING\n env:\n GREETING: Hey, there!\n")),(0,i.kt)("p",null,"Additionally, you can set global environment variables that will be available\nto all tasks:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nenv:\n GREETING: Hey, there!\n\ntasks:\n greet:\n cmds:\n - echo $GREETING\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},(0,i.kt)("inlineCode",{parentName:"p"},"env")," supports expansion and retrieving output from a shell command\njust like variables, as you can see in the ",(0,i.kt)("a",{parentName:"p",href:"#variables"},"Variables")," section.")),(0,i.kt)("h3",{id:"env-files"},".env files"),(0,i.kt)("p",null,"You can also ask Task to include ",(0,i.kt)("inlineCode",{parentName:"p"},".env")," like files by using the ",(0,i.kt)("inlineCode",{parentName:"p"},"dotenv:"),"\nsetting:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash",metastring:'title=".env"',title:'".env"'},"KEYNAME=VALUE\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash",metastring:'title="testing/.env"',title:'"testing/.env"'},"ENDPOINT=testing.com\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="Taskfile.yml"',title:'"Taskfile.yml"'},"version: '3'\n\nenv:\n ENV: testing\n\ndotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']\n\ntasks:\n greet:\n cmds:\n - echo \"Using $KEYNAME and endpoint $ENDPOINT\"\n")),(0,i.kt)("p",null,"Dotenv files can also be specified at the task level:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nenv:\n ENV: testing\n\ntasks:\n greet:\n dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']\n cmds:\n - echo \"Using $KEYNAME and endpoint $ENDPOINT\"\n")),(0,i.kt)("p",null,"Environment variables specified explicitly at the task-level will override\nvariables defined in dotfiles:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nenv:\n ENV: testing\n\ntasks:\n greet:\n dotenv: ['.env', '{{.ENV}}/.env.', '{{.HOME}}/.env']\n env:\n KEYNAME: DIFFERENT_VALUE\n cmds:\n - echo \"Using $KEYNAME and endpoint $ENDPOINT\"\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Please note that you are not currently able to use the ",(0,i.kt)("inlineCode",{parentName:"p"},"dotenv")," key inside included Taskfiles.")),(0,i.kt)("h2",{id:"including-other-taskfiles"},"Including other Taskfiles"),(0,i.kt)("p",null,"If you want to share tasks between different projects (Taskfiles), you can use\nthe importing mechanism to include other Taskfiles using the ",(0,i.kt)("inlineCode",{parentName:"p"},"includes")," keyword:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n docs: ./documentation # will look for ./documentation/Taskfile.yml\n docker: ./DockerTasks.yml\n")),(0,i.kt)("p",null,"The tasks described in the given Taskfiles will be available with the informed\nnamespace. So, you'd call ",(0,i.kt)("inlineCode",{parentName:"p"},"task docs:serve")," to run the ",(0,i.kt)("inlineCode",{parentName:"p"},"serve")," task from\n",(0,i.kt)("inlineCode",{parentName:"p"},"documentation/Taskfile.yml")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"task docker:build")," to run the ",(0,i.kt)("inlineCode",{parentName:"p"},"build")," task\nfrom the ",(0,i.kt)("inlineCode",{parentName:"p"},"DockerTasks.yml")," file."),(0,i.kt)("p",null,"Relative paths are resolved relative to the directory containing the including Taskfile."),(0,i.kt)("h3",{id:"os-specific-taskfiles"},"OS-specific Taskfiles"),(0,i.kt)("p",null,"With ",(0,i.kt)("inlineCode",{parentName:"p"},"version: '2'"),", task automatically includes any ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_{{OS}}.yml"),"\nif it exists (for example: ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_windows.yml"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_linux.yml")," or\n",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile_darwin.yml"),"). Since this behavior was a bit too implicit, it\nwas removed on version 3, but you still can have a similar behavior by\nexplicitly importing these files:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n build: ./Taskfile_{{OS}}.yml\n")),(0,i.kt)("h3",{id:"directory-of-included-taskfile"},"Directory of included Taskfile"),(0,i.kt)("p",null,"By default, included Taskfile's tasks are run in the current directory, even\nif the Taskfile is in another directory, but you can force its tasks to run\nin another directory by using this alternative syntax:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n docs:\n taskfile: ./docs/Taskfile.yml\n dir: ./docs\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The included Taskfiles must be using the same schema version as the main\nTaskfile uses.")),(0,i.kt)("h3",{id:"optional-includes"},"Optional includes"),(0,i.kt)("p",null,"Includes marked as optional will allow Task to continue execution as normal if\nthe included file is missing."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n tests:\n taskfile: ./tests/Taskfile.yml\n optional: true\n\ntasks:\n greet:\n cmds:\n - echo \"This command can still be successfully executed if ./tests/Taskfile.yml does not exist\"\n")),(0,i.kt)("h3",{id:"internal-includes"},"Internal includes"),(0,i.kt)("p",null,"Includes marked as internal will set all the tasks of the included file to be\ninternal as well (see the ",(0,i.kt)("a",{parentName:"p",href:"#internal-tasks"},"Internal tasks")," section below).\nThis is useful when including utility tasks that are not intended to be used\ndirectly by the user."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n tests:\n taskfile: ./taskfiles/Utils.yml\n internal: true\n")),(0,i.kt)("h3",{id:"vars-of-included-taskfiles"},"Vars of included Taskfiles"),(0,i.kt)("p",null,"You can also specify variables when including a Taskfile. This may be useful\nfor having reusable Taskfile that can be tweaked or even included more than once:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n backend:\n taskfile: ./taskfiles/Docker.yml\n vars:\n DOCKER_IMAGE: backend_image\n\n frontend:\n taskfile: ./taskfiles/Docker.yml\n vars:\n DOCKER_IMAGE: frontend_image\n")),(0,i.kt)("h3",{id:"namespace-aliases"},"Namespace aliases"),(0,i.kt)("p",null,"When including a Taskfile, you can give the namespace a list of ",(0,i.kt)("inlineCode",{parentName:"p"},"aliases"),".\nThis works in the same way as ",(0,i.kt)("a",{parentName:"p",href:"#task-aliases"},"task aliases")," and can be used\ntogether to create shorter and easier-to-type commands."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nincludes:\n generate:\n taskfile: ./taskfiles/Generate.yml\n aliases: [gen]\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Vars declared in the included Taskfile have preference over the\nvariables in the including Taskfile! If you want a variable in an included Taskfile to be overridable,\nuse the ",(0,i.kt)("a",{parentName:"p",href:"https://go-task.github.io/slim-sprig/defaults.html"},"default function"),":\n",(0,i.kt)("inlineCode",{parentName:"p"},"MY_VAR: '{{.MY_VAR | default \"my-default-value\"}}'"),".")),(0,i.kt)("h2",{id:"internal-tasks"},"Internal tasks"),(0,i.kt)("p",null,"Internal tasks are tasks that cannot be called directly by the user. They will\nnot appear in the output when running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --list|--list-all"),". Other tasks may\ncall internal tasks in the usual way. This is useful for creating reusable,\nfunction-like tasks that have no useful purpose on the command line."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-image-1:\n cmds:\n - task: build-image\n vars:\n DOCKER_IMAGE: image-1\n\n build-image:\n internal: true\n cmds:\n - docker build -t {{.DOCKER_IMAGE}} .\n")),(0,i.kt)("h2",{id:"task-directory"},"Task directory"),(0,i.kt)("p",null,"By default, tasks will be executed in the directory where the Taskfile is\nlocated. But you can easily make the task run in another folder, informing\n",(0,i.kt)("inlineCode",{parentName:"p"},"dir"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n serve:\n dir: public/www\n cmds:\n # run http server\n - caddy\n")),(0,i.kt)("p",null,"If the directory does not exist, ",(0,i.kt)("inlineCode",{parentName:"p"},"task")," creates it."),(0,i.kt)("h2",{id:"task-dependencies"},"Task dependencies"),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"Dependencies run in parallel, so dependencies of a task should not depend one\nanother. If you want to force tasks to run serially, take a look at the\n",(0,i.kt)("a",{parentName:"p",href:"#calling-another-task"},"Calling Another Task")," section below.")),(0,i.kt)("p",null,"You may have tasks that depend on others. Just pointing them on ",(0,i.kt)("inlineCode",{parentName:"p"},"deps")," will\nmake them run automatically before running the parent task:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n deps: [assets]\n cmds:\n - go build -v -i main.go\n\n assets:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"In the above example, ",(0,i.kt)("inlineCode",{parentName:"p"},"assets")," will always run right before ",(0,i.kt)("inlineCode",{parentName:"p"},"build")," if you run\n",(0,i.kt)("inlineCode",{parentName:"p"},"task build"),"."),(0,i.kt)("p",null,"A task can have only dependencies and no commands to group tasks together:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n assets:\n deps: [js, css]\n\n js:\n cmds:\n - minify -o public/script.js src/js\n\n css:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"If there is more than one dependency, they always run in parallel for better\nperformance."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"You can also make the tasks given by the command line run in parallel by\nusing the ",(0,i.kt)("inlineCode",{parentName:"p"},"--parallel")," flag (alias ",(0,i.kt)("inlineCode",{parentName:"p"},"-p"),"). Example: ",(0,i.kt)("inlineCode",{parentName:"p"},"task --parallel js css"),".")),(0,i.kt)("p",null,"If you want to pass information to dependencies, you can do that the same\nmanner as you would to ",(0,i.kt)("a",{parentName:"p",href:"#calling-another-task"},"call another task"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n default:\n deps:\n - task: echo_sth\n vars: {TEXT: "before 1"}\n - task: echo_sth\n vars: {TEXT: "before 2"}\n cmds:\n - echo "after"\n\n echo_sth:\n cmds:\n - echo {{.TEXT}}\n')),(0,i.kt)("h2",{id:"platform-specific-tasks-and-commands"},"Platform specific tasks and commands"),(0,i.kt)("p",null,"If you want to restrict the running of tasks to explicit platforms, this can be achieved\nusing the ",(0,i.kt)("inlineCode",{parentName:"p"},"platforms:")," key. Tasks can be restricted to a specific OS, architecture or a\ncombination of both.\nOn a mismatch, the task or command will be skipped, and no error will be thrown."),(0,i.kt)("p",null,"The values allowed as OS or Arch are valid ",(0,i.kt)("inlineCode",{parentName:"p"},"GOOS")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"GOARCH")," values, as\ndefined by the Go language\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/golang/go/blob/master/src/go/build/syslist.go"},"here"),"."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"build-windows")," task below will run only on Windows, and on any architecture:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-windows:\n platforms: [windows]\n cmds:\n - echo 'Running command on Windows'\n")),(0,i.kt)("p",null,"This can be restricted to a specific architecture as follows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-windows-amd64:\n platforms: [windows/amd64]\n cmds:\n - echo 'Running command on Windows (amd64)'\n")),(0,i.kt)("p",null,"It is also possible to restrict the task to specific architectures:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build-amd64:\n platforms: [amd64]\n cmds:\n - echo 'Running command on amd64'\n")),(0,i.kt)("p",null,"Multiple platforms can be specified as follows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n platforms: [windows/amd64, darwin]\n cmds:\n - echo 'Running command on Windows (amd64) and macOS'\n")),(0,i.kt)("p",null,"Individual commands can also be restricted to specific platforms:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - cmd: echo 'Running command on Windows (amd64) and macOS'\n platforms: [windows/amd64, darwin]\n - cmd: echo 'Running on all platforms'\n")),(0,i.kt)("h2",{id:"calling-another-task"},"Calling another task"),(0,i.kt)("p",null,"When a task has many dependencies, they are executed concurrently. This will\noften result in a faster build pipeline. However, in some situations, you may need\nto call other tasks serially. In this case, use the following syntax:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n main-task:\n cmds:\n - task: task-to-be-called\n - task: another-task\n - echo "Both done"\n\n task-to-be-called:\n cmds:\n - echo "Task to be called"\n\n another-task:\n cmds:\n - echo "Another task"\n')),(0,i.kt)("p",null,"Overriding variables in the called task is as simple as informing ",(0,i.kt)("inlineCode",{parentName:"p"},"vars"),"\nattribute:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n greet:\n vars:\n RECIPIENT: \'{{default "World" .RECIPIENT}}\'\n cmds:\n - echo "Hello, {{.RECIPIENT}}!"\n\n greet-pessimistically:\n cmds:\n - task: greet\n vars: {RECIPIENT: "Cruel World"}\n')),(0,i.kt)("p",null,"The above syntax is also supported in ",(0,i.kt)("inlineCode",{parentName:"p"},"deps"),"."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"NOTE: If you want to call a task declared in the root Taskfile from within an\n",(0,i.kt)("a",{parentName:"p",href:"#including-other-taskfiles"},"included Taskfile"),", add a leading ",(0,i.kt)("inlineCode",{parentName:"p"},":")," like this:\n",(0,i.kt)("inlineCode",{parentName:"p"},"task: :task-name"),".")),(0,i.kt)("h2",{id:"prevent-unnecessary-work"},"Prevent unnecessary work"),(0,i.kt)("h3",{id:"by-fingerprinting-locally-generated-files-and-their-sources"},"By fingerprinting locally generated files and their sources"),(0,i.kt)("p",null,"If a task generates something, you can inform Task the source and generated\nfiles, so Task will prevent running them if not necessary."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n deps: [js, css]\n cmds:\n - go build -v -i main.go\n\n js:\n cmds:\n - minify -o public/script.js src/js\n sources:\n - src/js/**/*.js\n generates:\n - public/script.js\n\n css:\n cmds:\n - minify -o public/style.css src/css\n sources:\n - src/css/**/*.css\n generates:\n - public/style.css\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"sources")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"generates")," can be files or file patterns. When given,\nTask will compare the checksum of the source files to determine if it's\nnecessary to run the task. If not, it will just print a message like\n",(0,i.kt)("inlineCode",{parentName:"p"},'Task "js" is up to date'),"."),(0,i.kt)("p",null,"If you prefer this check to be made by the modification timestamp of the files,\ninstead of its checksum (content), just set the ",(0,i.kt)("inlineCode",{parentName:"p"},"method")," property to ",(0,i.kt)("inlineCode",{parentName:"p"},"timestamp"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - go build .\n sources:\n - ./*.go\n generates:\n - app{{exeExt}}\n method: timestamp\n")),(0,i.kt)("p",null,"In situations where you need more flexibility the ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," keyword can be used.\nYou can even combine the two. See the documentation for\n",(0,i.kt)("a",{parentName:"p",href:"#using-programmatic-checks-to-indicate-a-task-is-up-to-date"},"status")," for an\nexample."),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"By default, task stores checksums on a local ",(0,i.kt)("inlineCode",{parentName:"p"},".task")," directory in the project's\ndirectory. Most of the time, you'll want to have this directory on ",(0,i.kt)("inlineCode",{parentName:"p"},".gitignore"),"\n(or equivalent) so it isn't committed. (If you have a task for code generation\nthat is committed it may make sense to commit the checksum of that task as\nwell, though)."),(0,i.kt)("p",{parentName:"admonition"},"If you want these files to be stored in another directory, you can set a\n",(0,i.kt)("inlineCode",{parentName:"p"},"TASK_TEMP_DIR")," environment variable in your machine. It can contain a relative\npath like ",(0,i.kt)("inlineCode",{parentName:"p"},"tmp/task")," that will be interpreted as relative to the project\ndirectory, or an absolute or home path like ",(0,i.kt)("inlineCode",{parentName:"p"},"/tmp/.task")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"~/.task"),"\n(subdirectories will be created for each project)."),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"export TASK_TEMP_DIR='~/.task'\n"))),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Each task has only one checksum stored for its ",(0,i.kt)("inlineCode",{parentName:"p"},"sources"),". If you want\nto distinguish a task by any of its input variables, you can add those\nvariables as part of the task's label, and it will be considered a different\ntask."),(0,i.kt)("p",{parentName:"admonition"},"This is useful if you want to run a task once for each distinct set of\ninputs until the sources actually change. For example, if the sources depend\non the value of a variable, or you if you want the task to rerun if some arguments\nchange even if the source has not.")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The method ",(0,i.kt)("inlineCode",{parentName:"p"},"none")," skips any validation and always run the task.")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"For the ",(0,i.kt)("inlineCode",{parentName:"p"},"checksum")," (default) or ",(0,i.kt)("inlineCode",{parentName:"p"},"timestamp")," method to work, it is only necessary to\ninform the source files.\nWhen the ",(0,i.kt)("inlineCode",{parentName:"p"},"timestamp")," method is used, the last time of the running the task is considered as a generate.")),(0,i.kt)("h3",{id:"using-programmatic-checks-to-indicate-a-task-is-up-to-date"},"Using programmatic checks to indicate a task is up to date."),(0,i.kt)("p",null,"Alternatively, you can inform a sequence of tests as ",(0,i.kt)("inlineCode",{parentName:"p"},"status"),". If no error\nis returned (exit status 0), the task is considered up-to-date:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n generate-files:\n cmds:\n - mkdir directory\n - touch directory/file1.txt\n - touch directory/file2.txt\n # test existence of files\n status:\n - test -d directory\n - test -f directory/file1.txt\n - test -f directory/file2.txt\n")),(0,i.kt)("p",null,"Normally, you would use ",(0,i.kt)("inlineCode",{parentName:"p"},"sources")," in combination with\n",(0,i.kt)("inlineCode",{parentName:"p"},"generates")," - but for tasks that generate remote artifacts (Docker images,\ndeploys, CD releases) the checksum source and timestamps require either\naccess to the artifact or for an out-of-band refresh of the ",(0,i.kt)("inlineCode",{parentName:"p"},".checksum"),"\nfingerprint file."),(0,i.kt)("p",null,"Two special variables ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.CHECKSUM}}")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.TIMESTAMP}}")," are available\nfor interpolation within ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," commands, depending on the method assigned\nto fingerprint the sources. Only ",(0,i.kt)("inlineCode",{parentName:"p"},"source")," globs are fingerprinted."),(0,i.kt)("p",null,"Note that the ",(0,i.kt)("inlineCode",{parentName:"p"},"{{.TIMESTAMP}}"),' variable is a "live" Go ',(0,i.kt)("inlineCode",{parentName:"p"},"time.Time")," struct, and\ncan be formatted using any of the methods that ",(0,i.kt)("inlineCode",{parentName:"p"},"time.Time")," responds to."),(0,i.kt)("p",null,"See ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/pkg/time/"},"the Go Time documentation")," for more information."),(0,i.kt)("p",null,"You can use ",(0,i.kt)("inlineCode",{parentName:"p"},"--force")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"-f")," if you want to force a task to run even when\nup-to-date."),(0,i.kt)("p",null,"Also, ",(0,i.kt)("inlineCode",{parentName:"p"},"task --status [tasks]...")," will exit with a non-zero exit code if any of\nthe tasks are not up-to-date."),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"status")," can be combined with the ",(0,i.kt)("a",{parentName:"p",href:"#by-fingerprinting-locally-generated-files-and-their-sources"},"fingerprinting"),"\nto have a task run if either the the source/generated artifacts changes, or the\nprogrammatic check fails:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:prod:\n desc: Build for production usage.\n cmds:\n - composer install\n # Run this task if source files changes.\n sources:\n - composer.json\n - composer.lock\n generates:\n - ./vendor/composer/installed.json\n - ./vendor/autoload.php\n # But also run the task if the last build was not a production build.\n status:\n - grep -q '\"dev\": false' ./vendor/composer/installed.json\n")),(0,i.kt)("h3",{id:"using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies"},"Using programmatic checks to cancel the execution of a task and its dependencies"),(0,i.kt)("p",null,"In addition to ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," checks, ",(0,i.kt)("inlineCode",{parentName:"p"},"preconditions")," checks are\nthe logical inverse of ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," checks. That is, if you need a certain set of\nconditions to be ",(0,i.kt)("em",{parentName:"p"},"true")," you can use the ",(0,i.kt)("inlineCode",{parentName:"p"},"preconditions")," stanza.\n",(0,i.kt)("inlineCode",{parentName:"p"},"preconditions")," are similar to ",(0,i.kt)("inlineCode",{parentName:"p"},"status")," lines, except they support ",(0,i.kt)("inlineCode",{parentName:"p"},"sh"),"\nexpansion, and they SHOULD all return 0."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n generate-files:\n cmds:\n - mkdir directory\n - touch directory/file1.txt\n - touch directory/file2.txt\n # test existence of files\n preconditions:\n - test -f .env\n - sh: "[ 1 = 0 ]"\n msg: "One doesn\'t equal Zero, Halting"\n')),(0,i.kt)("p",null,"Preconditions can set specific failure messages that can tell\na user what steps to take using the ",(0,i.kt)("inlineCode",{parentName:"p"},"msg")," field."),(0,i.kt)("p",null,"If a task has a dependency on a sub-task with a precondition, and that\nprecondition is not met - the calling task will fail. Note that a task\nexecuted with a failing precondition will not run unless ",(0,i.kt)("inlineCode",{parentName:"p"},"--force")," is\ngiven."),(0,i.kt)("p",null,"Unlike ",(0,i.kt)("inlineCode",{parentName:"p"},"status"),", which will skip a task if it is up to date and continue\nexecuting tasks that depend on it, a ",(0,i.kt)("inlineCode",{parentName:"p"},"precondition")," will fail a task, along\nwith any other tasks that depend on it."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\ntasks:\n task-will-fail:\n preconditions:\n - sh: "exit 1"\n\n task-will-also-fail:\n deps:\n - task-will-fail\n\n task-will-still-fail:\n cmds:\n - task: task-will-fail\n - echo "I will not run"\n')),(0,i.kt)("h3",{id:"limiting-when-tasks-run"},"Limiting when tasks run"),(0,i.kt)("p",null,"If a task executed by multiple ",(0,i.kt)("inlineCode",{parentName:"p"},"cmds")," or multiple ",(0,i.kt)("inlineCode",{parentName:"p"},"deps")," you can control\nwhen it is executed using ",(0,i.kt)("inlineCode",{parentName:"p"},"run"),". ",(0,i.kt)("inlineCode",{parentName:"p"},"run")," can also be set at the root\nof the Taskfile to change the behavior of all the tasks unless explicitly\noverridden."),(0,i.kt)("p",null,"Supported values for ",(0,i.kt)("inlineCode",{parentName:"p"},"run"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"always")," (default) always attempt to invoke the task regardless of the\nnumber of previous executions"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"once")," only invoke this task once regardless of the number of references"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"when_changed")," only invokes the task once for each unique set of variables\npassed into the task")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - task: generate-file\n vars: { CONTENT: '1' }\n - task: generate-file\n vars: { CONTENT: '2' }\n - task: generate-file\n vars: { CONTENT: '2' }\n\n generate-file:\n run: when_changed\n deps:\n - install-deps\n cmds:\n - echo {{.CONTENT}}\n\n install-deps:\n run: once\n cmds:\n - sleep 5 # long operation like installing packages\n")),(0,i.kt)("h2",{id:"variables"},"Variables"),(0,i.kt)("p",null,"When doing interpolation of variables, Task will look for the below.\nThey are listed below in order of importance (i.e. most important first):"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Variables declared in the task definition"),(0,i.kt)("li",{parentName:"ul"},"Variables given while calling a task from another\n(See ",(0,i.kt)("a",{parentName:"li",href:"#calling-another-task"},"Calling another task")," above)"),(0,i.kt)("li",{parentName:"ul"},"Variables of the ",(0,i.kt)("a",{parentName:"li",href:"#including-other-taskfiles"},"included Taskfile")," (when the task is included)"),(0,i.kt)("li",{parentName:"ul"},"Variables of the ",(0,i.kt)("a",{parentName:"li",href:"#vars-of-included-taskfiles"},"inclusion of the Taskfile")," (when the task is included)"),(0,i.kt)("li",{parentName:"ul"},"Global variables (those declared in the ",(0,i.kt)("inlineCode",{parentName:"li"},"vars:")," option in the Taskfile)"),(0,i.kt)("li",{parentName:"ul"},"Environment variables")),(0,i.kt)("p",null,"Example of sending parameters with environment variables:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ TASK_VARIABLE=a-value task do-something\n")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"A special variable ",(0,i.kt)("inlineCode",{parentName:"p"},".TASK")," is always available containing the task name.")),(0,i.kt)("p",null,"Since some shells do not support the above syntax to set environment variables\n(Windows) tasks also accept a similar style when not at the beginning of\nthe command."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},'$ task write-file FILE=file.txt "CONTENT=Hello, World!" print "MESSAGE=All done!"\n')),(0,i.kt)("p",null,"Example of locally declared vars:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print-var:\n cmds:\n - echo \"{{.VAR}}\"\n vars:\n VAR: Hello!\n")),(0,i.kt)("p",null,"Example of global vars in a ",(0,i.kt)("inlineCode",{parentName:"p"},"Taskfile.yml"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nvars:\n GREETING: Hello from Taskfile!\n\ntasks:\n greet:\n cmds:\n - echo \"{{.GREETING}}\"\n")),(0,i.kt)("h3",{id:"dynamic-variables"},"Dynamic variables"),(0,i.kt)("p",null,"The below syntax (",(0,i.kt)("inlineCode",{parentName:"p"},"sh:")," prop in a variable) is considered a dynamic variable.\nThe value will be treated as a command and the output assigned. If there are one\nor more trailing newlines, the last newline will be trimmed."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n cmds:\n - go build -ldflags=\"-X main.Version={{.GIT_COMMIT}}\" main.go\n vars:\n GIT_COMMIT:\n sh: git log -n 1 --format=%h\n")),(0,i.kt)("p",null,"This works for all types of variables."),(0,i.kt)("h2",{id:"forwarding-cli-arguments-to-commands"},"Forwarding CLI arguments to commands"),(0,i.kt)("p",null,"If ",(0,i.kt)("inlineCode",{parentName:"p"},"--")," is given in the CLI, all following parameters are added to a\nspecial ",(0,i.kt)("inlineCode",{parentName:"p"},".CLI_ARGS")," variable. This is useful to forward arguments to another\ncommand."),(0,i.kt)("p",null,"The below example will run ",(0,i.kt)("inlineCode",{parentName:"p"},"yarn install"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ task yarn -- install\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n yarn:\n cmds:\n - yarn {{.CLI_ARGS}}\n")),(0,i.kt)("h2",{id:"doing-task-cleanup-with-defer"},"Doing task cleanup with ",(0,i.kt)("inlineCode",{parentName:"h2"},"defer")),(0,i.kt)("p",null,"With the ",(0,i.kt)("inlineCode",{parentName:"p"},"defer")," keyword, it's possible to schedule cleanup to be run once\nthe task finishes. The difference with just putting it as the last command is\nthat this command will run even when the task fails."),(0,i.kt)("p",null,"In the example below, ",(0,i.kt)("inlineCode",{parentName:"p"},"rm -rf tmpdir/")," will run even if the third command fails:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - mkdir -p tmpdir/\n - defer: rm -rf tmpdir/\n - echo 'Do work on tmpdir/'\n")),(0,i.kt)("p",null,"If you want to move the cleanup command into another task, that is possible as\nwell:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - mkdir -p tmpdir/\n - defer: { task: cleanup }\n - echo 'Do work on tmpdir/'\n\n cleanup: rm -rf tmpdir/\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Due to the nature of how the\n",(0,i.kt)("a",{parentName:"p",href:"https://go.dev/tour/flowcontrol/13"},"Go's own ",(0,i.kt)("inlineCode",{parentName:"a"},"defer")," work"),", the deferred\ncommands are executed in the reverse order if you schedule multiple of them.")),(0,i.kt)("h2",{id:"gos-template-engine"},"Go's template engine"),(0,i.kt)("p",null,"Task parse commands as ",(0,i.kt)("a",{parentName:"p",href:"https://golang.org/pkg/text/template/"},"Go's template engine")," before executing\nthem. Variables are accessible through dot syntax (",(0,i.kt)("inlineCode",{parentName:"p"},".VARNAME"),")."),(0,i.kt)("p",null,"All functions by the Go's ",(0,i.kt)("a",{parentName:"p",href:"https://go-task.github.io/slim-sprig/"},"slim-sprig lib"),"\nare available. The following example gets the current date in a given format:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print-date:\n cmds:\n - echo {{now | date \"2006-01-02\"}}\n")),(0,i.kt)("p",null,"Task also adds the following functions:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"OS"),': Returns the operating system. Possible values are "windows", "linux",\n"darwin" (macOS) and "freebsd".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ARCH"),': return the architecture Task was compiled to: "386", "amd64", "arm"\nor "s390x".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"splitLines"),": Splits Unix (\\n) and Windows (\\r\\n) styled newlines."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"catLines"),": Replaces Unix (\\n) and Windows (\\r\\n) styled newlines with a space."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"toSlash"),": Does nothing on Unix, but on Windows converts a string from ",(0,i.kt)("inlineCode",{parentName:"li"},"\\"),"\npath format to ",(0,i.kt)("inlineCode",{parentName:"li"},"/"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fromSlash"),": Opposite of ",(0,i.kt)("inlineCode",{parentName:"li"},"toSlash"),". Does nothing on Unix, but on Windows\nconverts a string from ",(0,i.kt)("inlineCode",{parentName:"li"},"/")," path format to ",(0,i.kt)("inlineCode",{parentName:"li"},"\\"),"."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"exeExt"),": Returns the right executable extension for the current OS\n(",(0,i.kt)("inlineCode",{parentName:"li"},'".exe"')," for Windows, ",(0,i.kt)("inlineCode",{parentName:"li"},'""')," for others)."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shellQuote"),": Quotes a string to make it safe for use in shell scripts.\nTask uses ",(0,i.kt)("a",{parentName:"li",href:"https://pkg.go.dev/mvdan.cc/sh/v3@v3.4.0/syntax#Quote"},"this Go function"),"\nfor this. The Bash dialect is assumed.")),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n print-os:\n cmds:\n - echo '{{OS}} {{ARCH}}'\n - echo '{{if eq OS \"windows\"}}windows-command{{else}}unix-command{{end}}'\n # This will be path/to/file on Unix but path\\to\\file on Windows\n - echo '{{fromSlash \"path/to/file\"}}'\n enumerated-file:\n vars:\n CONTENT: |\n foo\n bar\n cmds:\n - |\n cat << EOF > output.txt\n {{range $i, $line := .CONTENT | splitLines -}}\n {{printf \"%3d\" $i}}: {{$line}}\n {{end}}EOF\n")),(0,i.kt)("h2",{id:"help"},"Help"),(0,i.kt)("p",null,"Running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --list")," (or ",(0,i.kt)("inlineCode",{parentName:"p"},"task -l"),") lists all tasks with a description.\nThe following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build:\n desc: Build the go binary.\n cmds:\n - go build -v -i main.go\n\n test:\n desc: Run all the go tests.\n cmds:\n - go test -race ./...\n\n js:\n cmds:\n - minify -o public/script.js src/js\n\n css:\n cmds:\n - minify -o public/style.css src/css\n")),(0,i.kt)("p",null,"would print the following output:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"* build: Build the go binary.\n* test: Run all the go tests.\n")),(0,i.kt)("p",null,"If you want to see all tasks, there's a ",(0,i.kt)("inlineCode",{parentName:"p"},"--list-all")," (alias ",(0,i.kt)("inlineCode",{parentName:"p"},"-a"),") flag as well."),(0,i.kt)("h2",{id:"display-summary-of-task"},"Display summary of task"),(0,i.kt)("p",null,"Running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --summary task-name")," will show a summary of a task.\nThe following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n release:\n deps: [build]\n summary: |\n Release your project to github\n\n It will build your project before starting the release.\n Please make sure that you have set GITHUB_TOKEN before starting.\n cmds:\n - your-release-tool\n\n build:\n cmds:\n - your-build-tool\n")),(0,i.kt)("p",null,"with running ",(0,i.kt)("inlineCode",{parentName:"p"},"task --summary release")," would print the following output:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"task: release\n\nRelease your project to github\n\nIt will build your project before starting the release.\nPlease make sure that you have set GITHUB_TOKEN before starting.\n\ndependencies:\n - build\n\ncommands:\n - your-release-tool\n")),(0,i.kt)("p",null,"If a summary is missing, the description will be printed.\nIf the task does not have a summary or a description, a warning is printed."),(0,i.kt)("p",null,"Please note: ",(0,i.kt)("em",{parentName:"p"},"showing the summary will not execute the command"),"."),(0,i.kt)("h2",{id:"task-aliases"},"Task aliases"),(0,i.kt)("p",null,"Aliases are alternative names for tasks. They can be used to make it easier and\nquicker to run tasks with long or hard-to-type names. You can use them on the\ncommand line, when ",(0,i.kt)("a",{parentName:"p",href:"#calling-another-task"},"calling sub-tasks")," in your Taskfile\nand when ",(0,i.kt)("a",{parentName:"p",href:"#including-other-taskfiles"},"including tasks")," with aliases from another\nTaskfile. They can also be used together with ",(0,i.kt)("a",{parentName:"p",href:"#namespace-aliases"},"namespace\naliases"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n generate:\n aliases: [gen]\n cmds:\n - task: gen-mocks\n\n generate-mocks:\n aliases: [gen-mocks]\n cmds:\n - echo \"generating...\"\n")),(0,i.kt)("h2",{id:"overriding-task-name"},"Overriding task name"),(0,i.kt)("p",null,"Sometimes you may want to override the task name printed on the summary, up-to-date\nmessages to STDOUT, etc. In this case, you can just set ",(0,i.kt)("inlineCode",{parentName:"p"},"label:"),", which can also\nbe interpolated with variables:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n - task: print\n vars:\n MESSAGE: hello\n - task: print\n vars:\n MESSAGE: world\n\n print:\n label: 'print-{{.MESSAGE}}'\n cmds:\n - echo \"{{.MESSAGE}}\"\n")),(0,i.kt)("h2",{id:"silent-mode"},"Silent mode"),(0,i.kt)("p",null,"Silent mode disables the echoing of commands before Task runs it.\nFor the following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - echo \"Print something\"\n")),(0,i.kt)("p",null,"Normally this will be printed:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},'echo "Print something"\nPrint something\n')),(0,i.kt)("p",null,"With silent mode on, the below will be printed instead:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"Print something\n")),(0,i.kt)("p",null,"There are four ways to enable silent mode:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"At command level:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - cmd: echo \"Print something\"\n silent: true\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"At task level:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - echo \"Print something\"\n silent: true\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Globally at Taskfile level:")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\nsilent: true\n\ntasks:\n echo:\n cmds:\n - echo \"Print something\"\n")),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Or globally with ",(0,i.kt)("inlineCode",{parentName:"li"},"--silent")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"-s")," flag")),(0,i.kt)("p",null,"If you want to suppress STDOUT instead, just redirect a command to ",(0,i.kt)("inlineCode",{parentName:"p"},"/dev/null"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - echo \"This will print nothing\" > /dev/null\n")),(0,i.kt)("h2",{id:"dry-run-mode"},"Dry run mode"),(0,i.kt)("p",null,"Dry run mode (",(0,i.kt)("inlineCode",{parentName:"p"},"--dry"),") compiles and steps through each task, printing the commands\nthat would be run without executing them. This is useful for debugging your Taskfiles."),(0,i.kt)("h2",{id:"ignore-errors"},"Ignore errors"),(0,i.kt)("p",null,"You have the option to ignore errors during command execution.\nGiven the following Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - exit 1\n - echo \"Hello World\"\n")),(0,i.kt)("p",null,"Task will abort the execution after running ",(0,i.kt)("inlineCode",{parentName:"p"},"exit 1")," because the status code ",(0,i.kt)("inlineCode",{parentName:"p"},"1")," stands for ",(0,i.kt)("inlineCode",{parentName:"p"},"EXIT_FAILURE"),".\nHowever, it is possible to continue with execution using ",(0,i.kt)("inlineCode",{parentName:"p"},"ignore_error"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n echo:\n cmds:\n - cmd: exit 1\n ignore_error: true\n - echo \"Hello World\"\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"ignore_error")," can also be set for a task, which means errors will be suppressed\nfor all commands. Nevertheless, keep in mind that this option will not propagate to other tasks\ncalled either by ",(0,i.kt)("inlineCode",{parentName:"p"},"deps")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"cmds"),"!"),(0,i.kt)("h2",{id:"output-syntax"},"Output syntax"),(0,i.kt)("p",null,"By default, Task just redirects the STDOUT and STDERR of the running commands\nto the shell in real-time. This is good for having live feedback for logging\nprinted by commands, but the output can become messy if you have multiple\ncommands running simultaneously and printing lots of stuff."),(0,i.kt)("p",null,"To make this more customizable, there are currently three different output\noptions you can choose:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"interleaved")," (default)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"group")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"prefixed"))),(0,i.kt)("p",null,"To choose another one, just set it to root in the Taskfile:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\noutput: 'group'\n\ntasks:\n # ...\n")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"group")," output will print the entire output of a command once after it\nfinishes, so you will not have live feedback for commands that take a long time\nto run."),(0,i.kt)("p",null,"When using the ",(0,i.kt)("inlineCode",{parentName:"p"},"group")," output, you can optionally provide a templated message\nto print at the start and end of the group. This can be useful for instructing\nCI systems to group all of the output for a given task, such as with\n",(0,i.kt)("a",{parentName:"p",href:"https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#grouping-log-lines"},"GitHub Actions' ",(0,i.kt)("inlineCode",{parentName:"a"},"::group::")," command"),"\nor ",(0,i.kt)("a",{parentName:"p",href:"https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?expand=1&view=azure-devops&tabs=bash#formatting-commands"},"Azure Pipelines"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\noutput:\n group:\n begin: '::group::{{.TASK}}'\n end: '::endgroup::'\n\ntasks:\n default:\n cmds:\n - echo 'Hello, World!'\n silent: true\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ task default\n::group::default\nHello, World!\n::endgroup::\n")),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"prefix")," output will prefix every line printed by a command with\n",(0,i.kt)("inlineCode",{parentName:"p"},"[task-name] ")," as the prefix, but you can customize the prefix for a command\nwith the ",(0,i.kt)("inlineCode",{parentName:"p"},"prefix:")," attribute:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: \'3\'\n\noutput: prefixed\n\ntasks:\n default:\n deps:\n - task: print\n vars: {TEXT: foo}\n - task: print\n vars: {TEXT: bar}\n - task: print\n vars: {TEXT: baz}\n\n print:\n cmds:\n - echo "{{.TEXT}}"\n prefix: "print-{{.TEXT}}"\n silent: true\n')),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"$ task default\n[print-foo] foo\n[print-bar] bar\n[print-baz] baz\n")),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"The ",(0,i.kt)("inlineCode",{parentName:"p"},"output")," option can also be specified by the ",(0,i.kt)("inlineCode",{parentName:"p"},"--output")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"-o")," flags.")),(0,i.kt)("h2",{id:"interactive-cli-application"},"Interactive CLI application"),(0,i.kt)("p",null,"When running interactive CLI applications inside Task they can sometimes behave\nweirdly, especially when the ",(0,i.kt)("a",{parentName:"p",href:"#output-syntax"},"output mode")," is set to something\nother than ",(0,i.kt)("inlineCode",{parentName:"p"},"interleaved")," (the default), or when interactive apps are run in\nparallel with other tasks."),(0,i.kt)("p",null,"The ",(0,i.kt)("inlineCode",{parentName:"p"},"interactive: true")," tells Task this is an interactive application and Task\nwill try to optimize for it:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n default:\n cmds:\n - vim my-file.txt\n interactive: true\n")),(0,i.kt)("p",null,"If you still have problems running an interactive app through Task, please open\nan issue about it."),(0,i.kt)("h2",{id:"short-task-syntax"},"Short task syntax"),(0,i.kt)("p",null,"Starting on Task v3, you can now write tasks with a shorter syntax if they\nhave the default settings (e.g. no custom ",(0,i.kt)("inlineCode",{parentName:"p"},"env:"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"vars:"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"desc:"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"silent:")," , etc):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\n\ntasks:\n build: go build -v -o ./app{{exeExt}} .\n\n run:\n - task: build\n - ./app{{exeExt}} -h localhost -p 8080\n")),(0,i.kt)("h2",{id:"set-and-shopt"},(0,i.kt)("inlineCode",{parentName:"h2"},"set")," and ",(0,i.kt)("inlineCode",{parentName:"h2"},"shopt")),(0,i.kt)("p",null,"It's possible to specify options to the\n",(0,i.kt)("a",{parentName:"p",href:"https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html"},(0,i.kt)("inlineCode",{parentName:"a"},"set")),"\nand ",(0,i.kt)("a",{parentName:"p",href:"https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html"},(0,i.kt)("inlineCode",{parentName:"a"},"shopt")),"\nbuiltins. This can be added at global, task or command level."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '2'\n\nset: [pipefail]\nshopt: [globstar]\n\ntasks:\n # `globstar` required for double star globs to work\n default: echo **/*.go\n")),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"Keep in mind that not all options are available in the\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/mvdan/sh"},"shell interpreter library")," that Task uses.")),(0,i.kt)("h2",{id:"watch-tasks"},"Watch tasks"),(0,i.kt)("p",null,"With the flags ",(0,i.kt)("inlineCode",{parentName:"p"},"--watch")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"-w")," task will watch for file changes\nand run the task again. This requires the ",(0,i.kt)("inlineCode",{parentName:"p"},"sources")," attribute to be given,\nso task knows which files to watch."),(0,i.kt)("p",null,"The default watch interval is 5 seconds, but it's possible to change it by\neither setting ",(0,i.kt)("inlineCode",{parentName:"p"},"interval: '500ms'")," in the root of the Taskfile passing it\nas an argument like ",(0,i.kt)("inlineCode",{parentName:"p"},"--interval=500ms"),"."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.281cdeaf.js b/assets/js/runtime~main.42fd07f1.js similarity index 91% rename from assets/js/runtime~main.281cdeaf.js rename to assets/js/runtime~main.42fd07f1.js index 58eee0b1..e26647ba 100644 --- a/assets/js/runtime~main.281cdeaf.js +++ b/assets/js/runtime~main.42fd07f1.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<e.length;d++){n=e[d][0],r=e[d][1],o=e[d][2];for(var c=!0,i=0;i<n.length;i++)(!1&o||f>=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[i])}))?n.splice(i--,1):(c=!1,o<f&&(f=o));if(c){e.splice(d--,1);var a=r();void 0!==a&&(t=a)}}return t}o=o||0;for(var d=e.length;d>0&&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",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:"d141bca5",53:"b58bb21d",80:"20f3396f",133:"6862b446",217:"4890eded",514:"c3290964",552:"e8bad103",582:"941e9bd2",595:"c5627647",648:"b629b889",671:"649e4736",705:"6bf3701e",713:"8ebae59e",780:"b979b06f",827:"731b757b",836:"098568bb",880:"bc3ff7f3",894:"4bf7d380",918:"22a90ead",920:"0724cc4c",945:"3694633c",972:"f5c2bd8c"}[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<a.length;d++){var b=a[d];if(b.getAttribute("src")==e||b.getAttribute("data-webpack")==o+n){c=b;break}}c||(i=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,u.nc&&c.setAttribute("nonce",u.nc),c.setAttribute("data-webpack",o+n),c.src=e),r[e]=[t];var l=function(t,n){c.onerror=c.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((function(e){return e(n)})),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),i&&document.head.appendChild(c)}},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="/",u.gca=function(e){return e={17896441:"918","9beb87c2":"34","935f2afb":"53","4d54d076":"80",f1d66b0d:"133","3b8c55ea":"217","1be78505":"514","0afd354a":"552",f7fd502c:"582",d0766b26:"595","3c140c84":"648","0e384e19":"671","7d415946":"705","1c56b476":"713","6476eba6":"827","0480b142":"836","5ef0e9d6":"880","1a4e3797":"920"}[e]||e,u.p+u.u(e)},function(){var e={303:0,532:0};u.f.j=function(t,n){var r=u.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var f=u.p+u.u(t),c=new Error;u.l(f,(function(n){if(u.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),f=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",c.name="ChunkLoadError",c.type=o,c.request=f,r[1](c)}}),"chunk-"+t,t)}},u.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,f=n[0],c=n[1],i=n[2],a=0;if(f.some((function(t){return 0!==e[t]}))){for(r in c)u.o(c,r)&&(u.m[r]=c[r]);if(i)var d=i(u)}for(t&&t(n);a<f.length;a++)o=f[a],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},n=self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}()}(); \ No newline at end of file +!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<e.length;d++){n=e[d][0],r=e[d][1],o=e[d][2];for(var c=!0,i=0;i<n.length;i++)(!1&o||f>=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[i])}))?n.splice(i--,1):(c=!1,o<f&&(f=o));if(c){e.splice(d--,1);var a=r();void 0!==a&&(t=a)}}return t}o=o||0;for(var d=e.length;d>0&&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",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:"d141bca5",53:"b58bb21d",80:"20f3396f",133:"6862b446",217:"4890eded",514:"c3290964",552:"e8bad103",582:"941e9bd2",595:"c5627647",648:"b629b889",671:"649e4736",705:"6bf3701e",713:"8ebae59e",780:"b979b06f",827:"756bbc7c",836:"098568bb",880:"bc3ff7f3",894:"4bf7d380",918:"22a90ead",920:"0724cc4c",945:"3694633c",972:"f5c2bd8c"}[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<a.length;d++){var l=a[d];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+n){c=l;break}}c||(i=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,u.nc&&c.setAttribute("nonce",u.nc),c.setAttribute("data-webpack",o+n),c.src=e),r[e]=[t];var b=function(t,n){c.onerror=c.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((function(e){return e(n)})),t)return t(n)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=b.bind(null,c.onerror),c.onload=b.bind(null,c.onload),i&&document.head.appendChild(c)}},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.p="/",u.gca=function(e){return e={17896441:"918","9beb87c2":"34","935f2afb":"53","4d54d076":"80",f1d66b0d:"133","3b8c55ea":"217","1be78505":"514","0afd354a":"552",f7fd502c:"582",d0766b26:"595","3c140c84":"648","0e384e19":"671","7d415946":"705","1c56b476":"713","6476eba6":"827","0480b142":"836","5ef0e9d6":"880","1a4e3797":"920"}[e]||e,u.p+u.u(e)},function(){var e={303:0,532:0};u.f.j=function(t,n){var r=u.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var f=u.p+u.u(t),c=new Error;u.l(f,(function(n){if(u.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),f=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",c.name="ChunkLoadError",c.type=o,c.request=f,r[1](c)}}),"chunk-"+t,t)}},u.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,f=n[0],c=n[1],i=n[2],a=0;if(f.some((function(t){return 0!==e[t]}))){for(r in c)u.o(c,r)&&(u.m[r]=c[r]);if(i)var d=i(u)}for(t&&t(n);a<f.length;a++)o=f[a],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},n=self.webpackChunktaskfile_dev=self.webpackChunktaskfile_dev||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}()}(); \ No newline at end of file diff --git a/changelog/index.html b/changelog/index.html index fa78451a..02005437 100644 --- a/changelog/index.html +++ b/changelog/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -232,7 +232,7 @@ Mode is enabled <a href="https://github.com/go-task/task/pull/138" target="_blank" rel="noopener noreferrer">#138</a>, <a href="https://github.com/go-task/task/pull/159" target="_blank" rel="noopener noreferrer">#159</a> ).</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v221---2018-12-09">v2.2.1 - 2018-12-09<a class="hash-link" href="#v221---2018-12-09" title="Direct link to heading"></a></h2><ul><li>This repository now uses Go Modules (#143). We'll still keep the <code>vendor</code> directory in sync for some time, though;</li><li>Fixing a bug when the Taskfile has no tasks but includes another Taskfile (#150);</li><li>Fix a bug when calling another task or a dependency in an included Taskfile (#151).</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v220---2018-10-25">v2.2.0 - 2018-10-25<a class="hash-link" href="#v220---2018-10-25" title="Direct link to heading"></a></h2><ul><li>Added support for <a href="https://taskfile.org/#/usage?id=including-other-taskfiles" target="_blank" rel="noopener noreferrer">including other Taskfiles</a> (#98)<ul><li>This should be considered experimental. For now, only including local files is supported, but support for including remote Taskfiles is being discussed. If you have any feedback, please comment on #98.</li></ul></li><li>Task now have a dedicated documentation site: <a href="https://taskfile.org" target="_blank" rel="noopener noreferrer">https://taskfile.org</a><ul><li>Thanks to <a href="https://docsify.js.org/" target="_blank" rel="noopener noreferrer">Docsify</a> for making this pretty easy. To check the source code, just take a look at the <a href="https://github.com/go-task/task/tree/master/docs" target="_blank" rel="noopener noreferrer">docs</a> directory of this repository. Contributions to the documentation is really appreciated.</li></ul></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v211---2018-09-17">v2.1.1 - 2018-09-17<a class="hash-link" href="#v211---2018-09-17" title="Direct link to heading"></a></h2><ul><li>Fix suggestion to use <code>task --init</code> not being shown anymore (when a <code>Taskfile.yml</code> is not found)</li><li>Fix error when using checksum method and no file exists for a source glob (#131)</li><li>Fix signal handling when the <code>--watch</code> flag is given (#132)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v210---2018-08-19">v2.1.0 - 2018-08-19<a class="hash-link" href="#v210---2018-08-19" title="Direct link to heading"></a></h2><ul><li>Add a <code>ignore_error</code> option to task and command (#123)</li><li>Add a dry run mode (<code>--dry</code> flag) (#126)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v203---2018-06-24">v2.0.3 - 2018-06-24<a class="hash-link" href="#v203---2018-06-24" title="Direct link to heading"></a></h2><ul><li>Expand environment variables on "dir", "sources" and "generates" (#116)</li><li>Fix YAML merging syntax (#112)</li><li>Add ZSH completion (#111)</li><li>Implement new <code>output</code> option. Please check out the <a href="https://github.com/go-task/task#output-syntax" target="_blank" rel="noopener noreferrer">documentation</a></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v202---2018-05-01">v2.0.2 - 2018-05-01<a class="hash-link" href="#v202---2018-05-01" title="Direct link to heading"></a></h2><ul><li>Fix merging of YAML anchors (#112)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v201---2018-03-11">v2.0.1 - 2018-03-11<a class="hash-link" href="#v201---2018-03-11" title="Direct link to heading"></a></h2><ul><li>Fixes panic on <code>task --list</code></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v200---2018-03-08">v2.0.0 - 2018-03-08<a class="hash-link" href="#v200---2018-03-08" title="Direct link to heading"></a></h2><p>Version 2.0.0 is here, with a new Taskfile format.</p><p>Please, make sure to read the <a href="https://github.com/go-task/task/blob/master/TASKFILE_VERSIONS.md" target="_blank" rel="noopener noreferrer">Taskfile versions</a> document, since it describes in depth what changed for this version.</p><ul><li>New Taskfile version 2 (<a href="https://github.com/go-task/task/issues/77" target="_blank" rel="noopener noreferrer">https://github.com/go-task/task/issues/77</a>)</li><li>Possibility to have global variables in the <code>Taskfile.yml</code> instead of <code>Taskvars.yml</code> (<a href="https://github.com/go-task/task/issues/66" target="_blank" rel="noopener noreferrer">https://github.com/go-task/task/issues/66</a>)</li><li>Small improvements and fixes</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v144---2017-11-19">v1.4.4 - 2017-11-19<a class="hash-link" href="#v144---2017-11-19" title="Direct link to heading"></a></h2><ul><li>Handle SIGINT and SIGTERM (#75);</li><li>List: print message with there's no task with description;</li><li>Expand home dir ("~" symbol) on paths (#74);</li><li>Add Snap as an installation method;</li><li>Move examples to its own repo;</li><li>Watch: also walk on tasks called on on "cmds", and not only on "deps";</li><li>Print logs to stderr instead of stdout (#68);</li><li>Remove deprecated <code>set</code> keyword;</li><li>Add checksum based status check, alternative to timestamp based.</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v143---2017-09-07">v1.4.3 - 2017-09-07<a class="hash-link" href="#v143---2017-09-07" title="Direct link to heading"></a></h2><ul><li>Allow assigning variables to tasks at run time via CLI (#33)</li><li>Added suport for multiline variables from sh (#64)</li><li>Fixes env: remove square braces and evaluate shell (#62)</li><li>Watch: change watch library and few fixes and improvements</li><li>When use watching, cancel and restart long running process on file change (#59 and #60)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v142---2017-07-30">v1.4.2 - 2017-07-30<a class="hash-link" href="#v142---2017-07-30" title="Direct link to heading"></a></h2><ul><li>Flag to set directory of execution</li><li>Always echo command if is verbose mode</li><li>Add silent mode to disable echoing of commands</li><li>Fixes and improvements of variables (#56)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v141---2017-07-15">v1.4.1 - 2017-07-15<a class="hash-link" href="#v141---2017-07-15" title="Direct link to heading"></a></h2><ul><li>Allow use of YAML for dynamic variables instead of $ prefix<ul><li><code>VAR: {sh: echo Hello}</code> instead of <code>VAR: $echo Hello</code></li></ul></li><li>Add <code>--list</code> (or <code>-l</code>) flag to print existing tasks</li><li>OS specific Taskvars file (e.g. <code>Taskvars_windows.yml</code>, <code>Taskvars_linux.yml</code>, etc)</li><li>Consider task up-to-date on equal timestamps (#49)</li><li>Allow absolute path in generates section (#48)</li><li>Bugfix: allow templating when calling deps (#42)</li><li>Fix panic for invalid task in cyclic dep detection</li><li>Better error output for dynamic variables in Taskvars.yml (#41)</li><li>Allow template evaluation in parameters</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v140---2017-07-06">v1.4.0 - 2017-07-06<a class="hash-link" href="#v140---2017-07-06" title="Direct link to heading"></a></h2><ul><li>Cache dynamic variables</li><li>Add verbose mode (<code>-v</code> flag)</li><li>Support to task parameters (overriding vars) (#31) (#32)</li><li>Print command, also when "set:" is specified (#35)</li><li>Improve task command help text (#35)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v131---2017-06-14">v1.3.1 - 2017-06-14<a class="hash-link" href="#v131---2017-06-14" title="Direct link to heading"></a></h2><ul><li>Fix glob not working on commands (#28)</li><li>Add ExeExt template function</li><li>Add <code>--init</code> flag to create a new Taskfile</li><li>Add status option to prevent task from running (#27)</li><li>Allow interpolation on <code>generates</code> and <code>sources</code> attributes (#26)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v130---2017-04-24">v1.3.0 - 2017-04-24<a class="hash-link" href="#v130---2017-04-24" title="Direct link to heading"></a></h2><ul><li>Migrate from os/exec.Cmd to a native Go sh/bash interpreter<ul><li>This is a potentially breaking change if you use Windows.</li><li>Now, <code>cmd</code> is not used anymore on Windows. Always use Bash-like syntax for your commands, even on Windows.</li></ul></li><li>Add "ToSlash" and "FromSlash" to template functions</li><li>Use functions defined on github.com/Masterminds/sprig</li><li>Do not redirect stdin while running variables commands</li><li>Using <code>context</code> and <code>errgroup</code> packages (this will make other tasks to be cancelled, if one returned an error)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v120---2017-04-02">v1.2.0 - 2017-04-02<a class="hash-link" href="#v120---2017-04-02" title="Direct link to heading"></a></h2><ul><li>More tests and Travis integration</li><li>Watch a task (experimental)</li><li>Possibility to call another task</li><li>Fix "=" not being reconized in variables/environment variables</li><li>Tasks can now have a description, and help will print them (#10)</li><li>Task dependencies now run concurrently</li><li>Support for a default task (#16)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v110---2017-03-08">v1.1.0 - 2017-03-08<a class="hash-link" href="#v110---2017-03-08" title="Direct link to heading"></a></h2><ul><li>Support for YAML, TOML and JSON (#1)</li><li>Support running command in another directory (#4)</li><li><code>--force</code> or <code>-f</code> flag to force execution of task even when it's up-to-date</li><li>Detection of cyclic dependencies (#5)</li><li>Support for variables (#6, #9, #14)</li><li>Operation System specific commands and variables (#13)</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="v100---2017-02-28">v1.0.0 - 2017-02-28<a class="hash-link" href="#v100---2017-02-28" title="Direct link to heading"></a></h2><ul><li>Add LICENSE file</li></ul></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/styleguide/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Styleguide</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/community/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Community</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#v3191---2022-12-31" class="table-of-contents__link toc-highlight">v3.19.1 - 2022-12-31</a></li><li><a href="#v3190---2022-12-05" class="table-of-contents__link toc-highlight">v3.19.0 - 2022-12-05</a></li><li><a href="#v3180---2022-11-12" class="table-of-contents__link toc-highlight">v3.18.0 - 2022-11-12</a></li><li><a href="#v3170---2022-10-14" class="table-of-contents__link toc-highlight">v3.17.0 - 2022-10-14</a></li><li><a href="#v3160---2022-09-29" class="table-of-contents__link toc-highlight">v3.16.0 - 2022-09-29</a></li><li><a href="#v3152---2022-09-08" class="table-of-contents__link toc-highlight">v3.15.2 - 2022-09-08</a></li><li><a href="#v3150---2022-09-03" class="table-of-contents__link toc-highlight">v3.15.0 - 2022-09-03</a></li><li><a href="#v3141---2022-08-03" class="table-of-contents__link toc-highlight">v3.14.1 - 2022-08-03</a></li><li><a href="#v3140---2022-07-08" class="table-of-contents__link toc-highlight">v3.14.0 - 2022-07-08</a></li><li><a href="#v3130---2022-06-13" class="table-of-contents__link toc-highlight">v3.13.0 - 2022-06-13</a></li><li><a href="#v3121---2022-05-10" class="table-of-contents__link toc-highlight">v3.12.1 - 2022-05-10</a></li><li><a href="#v3120---2022-03-31" class="table-of-contents__link toc-highlight">v3.12.0 - 2022-03-31</a></li><li><a href="#v3110---2022-02-19" class="table-of-contents__link toc-highlight">v3.11.0 - 2022-02-19</a></li><li><a href="#v3100---2022-01-04" class="table-of-contents__link toc-highlight">v3.10.0 - 2022-01-04</a></li><li><a href="#v392---2021-12-02" class="table-of-contents__link toc-highlight">v3.9.2 - 2021-12-02</a></li><li><a href="#v391---2021-11-28" class="table-of-contents__link toc-highlight">v3.9.1 - 2021-11-28</a></li><li><a href="#v390---2021-10-02" class="table-of-contents__link toc-highlight">v3.9.0 - 2021-10-02</a></li><li><a href="#v380---2021-09-26" class="table-of-contents__link toc-highlight">v3.8.0 - 2021-09-26</a></li><li><a href="#v373---2021-09-04" class="table-of-contents__link toc-highlight">v3.7.3 - 2021-09-04</a></li><li><a href="#v370---2021-07-31" class="table-of-contents__link toc-highlight">v3.7.0 - 2021-07-31</a></li><li><a href="#v360---2021-07-10" class="table-of-contents__link toc-highlight">v3.6.0 - 2021-07-10</a></li><li><a href="#v350---2021-07-04" class="table-of-contents__link toc-highlight">v3.5.0 - 2021-07-04</a></li><li><a href="#v343---2021-05-30" class="table-of-contents__link toc-highlight">v3.4.3 - 2021-05-30</a></li><li><a href="#v342---2021-04-23" class="table-of-contents__link toc-highlight">v3.4.2 - 2021-04-23</a></li><li><a href="#v341---2021-04-17" class="table-of-contents__link toc-highlight">v3.4.1 - 2021-04-17</a></li><li><a href="#v330---2021-03-20" class="table-of-contents__link toc-highlight">v3.3.0 - 2021-03-20</a></li><li><a href="#v322---2021-01-12" class="table-of-contents__link toc-highlight">v3.2.2 - 2021-01-12</a></li><li><a href="#v321---2021-01-09" class="table-of-contents__link toc-highlight">v3.2.1 - 2021-01-09</a></li><li><a href="#v320---2021-01-07" class="table-of-contents__link toc-highlight">v3.2.0 - 2021-01-07</a></li><li><a href="#v310---2021-01-03" class="table-of-contents__link toc-highlight">v3.1.0 - 2021-01-03</a></li><li><a href="#v301---2020-12-26" class="table-of-contents__link toc-highlight">v3.0.1 - 2020-12-26</a></li><li><a href="#v300---2020-08-16" class="table-of-contents__link toc-highlight">v3.0.0 - 2020-08-16</a></li><li><a href="#v281---2020-05-20" class="table-of-contents__link toc-highlight">v2.8.1 - 2020-05-20</a></li><li><a href="#v280---2019-12-07" class="table-of-contents__link toc-highlight">v2.8.0 - 2019-12-07</a></li><li><a href="#v271---2019-11-10" class="table-of-contents__link toc-highlight">v2.7.1 - 2019-11-10</a></li><li><a href="#v270---2019-09-22" class="table-of-contents__link toc-highlight">v2.7.0 - 2019-09-22</a></li><li><a href="#v260---2019-07-21" class="table-of-contents__link toc-highlight">v2.6.0 - 2019-07-21</a></li><li><a href="#v252---2019-05-11" class="table-of-contents__link toc-highlight">v2.5.2 - 2019-05-11</a></li><li><a href="#251---2019-04-27" class="table-of-contents__link toc-highlight">2.5.1 - 2019-04-27</a></li><li><a href="#v250---2019-03-16" class="table-of-contents__link toc-highlight">v2.5.0 - 2019-03-16</a></li><li><a href="#v240---2019-02-21" class="table-of-contents__link toc-highlight">v2.4.0 - 2019-02-21</a></li><li><a href="#v230---2019-01-02" class="table-of-contents__link toc-highlight">v2.3.0 - 2019-01-02</a></li><li><a href="#v221---2018-12-09" class="table-of-contents__link toc-highlight">v2.2.1 - 2018-12-09</a></li><li><a href="#v220---2018-10-25" class="table-of-contents__link toc-highlight">v2.2.0 - 2018-10-25</a></li><li><a href="#v211---2018-09-17" class="table-of-contents__link toc-highlight">v2.1.1 - 2018-09-17</a></li><li><a href="#v210---2018-08-19" class="table-of-contents__link toc-highlight">v2.1.0 - 2018-08-19</a></li><li><a href="#v203---2018-06-24" class="table-of-contents__link toc-highlight">v2.0.3 - 2018-06-24</a></li><li><a href="#v202---2018-05-01" class="table-of-contents__link toc-highlight">v2.0.2 - 2018-05-01</a></li><li><a href="#v201---2018-03-11" class="table-of-contents__link toc-highlight">v2.0.1 - 2018-03-11</a></li><li><a href="#v200---2018-03-08" class="table-of-contents__link toc-highlight">v2.0.0 - 2018-03-08</a></li><li><a href="#v144---2017-11-19" class="table-of-contents__link toc-highlight">v1.4.4 - 2017-11-19</a></li><li><a href="#v143---2017-09-07" class="table-of-contents__link toc-highlight">v1.4.3 - 2017-09-07</a></li><li><a href="#v142---2017-07-30" class="table-of-contents__link toc-highlight">v1.4.2 - 2017-07-30</a></li><li><a href="#v141---2017-07-15" class="table-of-contents__link toc-highlight">v1.4.1 - 2017-07-15</a></li><li><a href="#v140---2017-07-06" class="table-of-contents__link toc-highlight">v1.4.0 - 2017-07-06</a></li><li><a href="#v131---2017-06-14" class="table-of-contents__link toc-highlight">v1.3.1 - 2017-06-14</a></li><li><a href="#v130---2017-04-24" class="table-of-contents__link toc-highlight">v1.3.0 - 2017-04-24</a></li><li><a href="#v120---2017-04-02" class="table-of-contents__link toc-highlight">v1.2.0 - 2017-04-02</a></li><li><a href="#v110---2017-03-08" class="table-of-contents__link toc-highlight">v1.1.0 - 2017-03-08</a></li><li><a href="#v100---2017-02-28" class="table-of-contents__link toc-highlight">v1.0.0 - 2017-02-28</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/community/index.html b/community/index.html index 7a68ed71..eb70a595 100644 --- a/community/index.html +++ b/community/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -39,7 +39,7 @@ by <a href="https://github.com/carlsmedstad" target="_blank" rel="noopener noref <a href="https://github.com/go-task/task/issues?q=is%3Aissue" target="_blank" rel="noopener noreferrer">reported bugs</a> and <a href="https://github.com/go-task/task/discussions" target="_blank" rel="noopener noreferrer">answered questions</a>.</p><p>If you know something that is missing in this document, please submit a pull request.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/changelog/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Changelog</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/contributing/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Contributing</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#translations" class="table-of-contents__link toc-highlight">Translations</a></li><li><a href="#editor-integrations" class="table-of-contents__link toc-highlight">Editor Integrations</a><ul><li><a href="#json-schema" class="table-of-contents__link toc-highlight">JSON Schema</a></li><li><a href="#visual-studio-code-extension" class="table-of-contents__link toc-highlight">Visual Studio Code extension</a></li><li><a href="#sublime-text-4-package" class="table-of-contents__link toc-highlight">Sublime Text 4 package</a></li><li><a href="#intellij-plugin" class="table-of-contents__link toc-highlight">IntelliJ plugin</a></li></ul></li><li><a href="#installation-methods" class="table-of-contents__link toc-highlight">Installation methods</a></li><li><a href="#more" class="table-of-contents__link toc-highlight">More</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/contributing/index.html b/contributing/index.html index d13466c2..a1670cbd 100644 --- a/contributing/index.html +++ b/contributing/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -64,7 +64,7 @@ simpler issues that are ideal for first time contributions.</p><p>All kinds of c feature. You can also contribute by upvoting/commenting on issues, helping to answer questions or contributing to other <a href="/community/">community projects</a>.</p><blockquote><p>I'm stuck, where can I get help?</p></blockquote><p>If you have questions, feel free to ask them in the <code>#help</code> channel on our <a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer">Discord server</a>.</p><hr></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/community/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Community</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/releasing/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Releasing</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#before-you-start" class="table-of-contents__link toc-highlight">Before you start</a></li><li><a href="#1-setup" class="table-of-contents__link toc-highlight">1. Setup</a></li><li><a href="#2-making-changes" class="table-of-contents__link toc-highlight">2. Making changes</a><ul><li><a href="#running-your-changes" class="table-of-contents__link toc-highlight">Running your changes</a></li><li><a href="#updating-documentation" class="table-of-contents__link toc-highlight">Updating documentation</a></li><li><a href="#writing-tests" class="table-of-contents__link toc-highlight">Writing tests</a></li></ul></li><li><a href="#3-committing-your-code" class="table-of-contents__link toc-highlight">3. Committing your code</a></li><li><a href="#4-submitting-a-pr" class="table-of-contents__link toc-highlight">4. Submitting a PR</a></li><li><a href="#faq" class="table-of-contents__link toc-highlight">FAQ</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/donate/index.html b/donate/index.html index 61d40c6d..b8c66cca 100644 --- a/donate/index.html +++ b/donate/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -25,7 +25,7 @@ Suspect businesses (gambling, casinos, etc) won't be allowed, though.</p><h Just use the following links to do your donation:</p><ul><li><a href="https://github.com/sponsors/andreynering" target="_blank" rel="noopener noreferrer">@andreynering</a></li><li><a href="https://github.com/sponsors/pd93" target="_blank" rel="noopener noreferrer">@pd93</a></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="open-collective">Open Collective<a class="hash-link" href="#open-collective" title="Direct link to heading"></a></h2><p>If you prefer <a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer">Open Collective</a> you can donate by using these links:</p><ul><li><a href="https://opencollective.com/task/contribute/backer-4034/checkout" target="_blank" rel="noopener noreferrer">$2 per month</a></li><li><a href="https://opencollective.com/task/contribute/supporter-8404/checkout" target="_blank" rel="noopener noreferrer">$5 per month</a></li><li><a href="https://opencollective.com/task/contribute/sponsor-4035/checkout" target="_blank" rel="noopener noreferrer">$20 per month</a></li><li><a href="https://opencollective.com/task/contribute/sponsor-28775/checkout" target="_blank" rel="noopener noreferrer">$50 per month</a></li><li><a href="https://opencollective.com/task/donate" target="_blank" rel="noopener noreferrer">Custom value - One-time donation option supported</a></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="paypal">PayPal<a class="hash-link" href="#paypal" title="Direct link to heading"></a></h2><p>You can donate to <a href="https://github.com/andreynering" target="_blank" rel="noopener noreferrer">@andreynering</a> via PayPal as well:</p><ul><li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A&currency_code=USD&source=url" target="_blank" rel="noopener noreferrer">Any value - One-time donation</a></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="pix-brazil-only">PIX (Brazil only)<a class="hash-link" href="#pix-brazil-only" title="Direct link to heading"></a></h2><p>And if you're Brazilian, you can also donate to <a href="https://github.com/andreynering" target="_blank" rel="noopener noreferrer">@andreynering</a> via PIX by <a target="_blank" href="/assets/files/pix-49e151b096476e5f5d024e7c0e1a02db.png">using this QR Code</a>.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/taskfile-versions/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Taskfile Versions</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#github-sponsors" class="table-of-contents__link toc-highlight">GitHub Sponsors</a></li><li><a href="#open-collective" class="table-of-contents__link toc-highlight">Open Collective</a></li><li><a href="#paypal" class="table-of-contents__link toc-highlight">PayPal</a></li><li><a href="#pix-brazil-only" class="table-of-contents__link toc-highlight">PIX (Brazil only)</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/faq/index.html b/faq/index.html index 4a69371e..b1643924 100644 --- a/faq/index.html +++ b/faq/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -28,7 +28,7 @@ around this limitation using one of the following methods:</p><ul><li>Use the <c detect windows and run the command in Powershell directly.</li><li>Use a shell on Windows that supports these commands as builtins, such as <a href="https://gitforwindows.org/" target="_blank" rel="noopener noreferrer">Git Bash</a> or <a href="https://learn.microsoft.com/en-us/windows/wsl/install" target="_blank" rel="noopener noreferrer">WSL</a>.</li></ul><p>We want to make improvements to this part of Task and the issues below track this work. Constructive comments and contributions are very welcome!</p><ul><li><a href="https://github.com/go-task/task/issues/197" target="_blank" rel="noopener noreferrer">#197</a></li><li><a href="https://github.com/mvdan/sh/issues/93" target="_blank" rel="noopener noreferrer">mvdan/sh#93</a></li><li><a href="https://github.com/mvdan/sh/issues/97" target="_blank" rel="noopener noreferrer">mvdan/sh#97</a></li></ul></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/api/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">API Reference</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/styleguide/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Styleguide</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#why-wont-my-task-update-my-shell-environment" class="table-of-contents__link toc-highlight">Why won't my task update my shell environment?</a></li><li><a href="#x-builtin-command-doesnt-work-on-windows" class="table-of-contents__link toc-highlight">'x' builtin command doesn't work on Windows</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/index.html b/index.html index 6c5583ad..e5fbbc5a 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -28,7 +28,7 @@ to install on your CI script and you're ready to use Task as part of your C Task also supports Windows thanks to <a href="https://github.com/mvdan/sh" target="_blank" rel="noopener noreferrer">this shell interpreter for Go</a>.</li><li>Great for code generation: you can easily <a href="/usage#prevent-unnecessary-work">prevent a task from running</a> if a given set of files haven't changed since last run (based either on its timestamp or content).</li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="gold-sponsors">Gold Sponsors<a class="hash-link" href="#gold-sponsors" title="Direct link to heading"></a></h2><div class="gold-sponsors"><table><thead><tr><th><a href="https://appwrite.io/?utm_source=taskfile.dev&utm_medium=website&utm_campaign=task_oss_fund" target="_blank" rel="noopener noreferrer">Appwrite</a></th></tr></thead><tbody><tr><td><a href="https://appwrite.io/?utm_source=taskfile.dev&utm_medium=website&utm_campaign=task_oss_fund" target="_blank" rel="noopener noreferrer"><img loading="lazy" alt="Appwrite" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTczIiBoZWlnaHQ9IjMwIiB2aWV3Qm94PSIwIDAgMTczIDMwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMzUgMTQuOTk5OUMzNSAyMS42MjczIDI5LjkwMjEgMjcgMjMuNjEzMSAyN0MyMC42OTIxIDI3IDE4LjAyODEgMjUuODQwNiAxNi4wMTIzIDIzLjkzNTNDMTkuMjQxNSAyMi40MDMyIDIxLjQ4OTUgMTguOTgyNiAyMS40ODk1IDE1LjAwODZDMjEuNDg5NSAxMS4wMjk1IDE5LjIzNTkgNy42MDUzNSAxNiA2LjA3NjE0QzE4LjAxNzUgNC4xNjM4NyAyMC42ODYyIDMgMjMuNjEzMSAzQzI5LjkwMjEgMyAzNSA4LjM3MjU1IDM1IDE0Ljk5OTlaIiBmaWxsPSIjRjAyRTY1Ii8+CjxwYXRoIGQ9Ik0xOS4yMjk0IDUuNDM2OTlDMTEuODYxOSAtMC4xMjQ4NDMgMS4yMjk2IDQuMzY1OCAwLjA5MTYxMSAxMy41MjA1Qy0wLjQzNzIwOCAxNy43NzUyIDEuMzQ5NDUgMjEuOTg3OCA0Ljc3NjkgMjQuNTY4QzEyLjE0ODYgMzAuMTI0OSAyMi43Nzc3IDI1LjYyNjQgMjMuOTA5NCAxNi40NzA5QzI0LjQzNDUgMTIuMjIxNiAyMi42NTA1IDguMDE1NjkgMTkuMjI5NCA1LjQzNjg3VjUuNDM2OTlaTTE3Ljg5NTEgNy4yMDI4NUMyMy45MDU5IDExLjczMzcgMjIuNzUyNCAyMS4wNjUgMTUuODE4OSAyMy45OTk0QzEyLjYwMTQgMjUuMzYxMyA4LjkwMDYxIDI0LjkwNDkgNi4xMTExMSAyMi44MDJDMC4xMDA2NDYgMTguMjcxIDEuMjUzOTMgOC45Mzk3MSA4LjE4NzM2IDYuMDA1NDNDMTEuNDA1IDQuNjQzNzcgMTUuMTA1NyA1LjEwMDA2IDE3Ljg5NTEgNy4yMDI4NVoiIGZpbGw9IiNGMDJFNjUiLz4KPHBhdGggZD0iTTQ4LjUxMzIgNi43ODUzNEM1MC4xMzcxIDYuNzg1MzQgNTEuNTIxMyA3LjE5NTI5IDUyLjY2NTkgOC4wMTU2NkM1My44MTA0IDguODM2MTQgNTQuNTk3NCA5LjkyMzU0IDU1LjAyNyAxMS4yNzc5VjYuOTgzODhINTcuMDUzMlYyMi42MTQ0SDU1LjAyN1YxOC4zMjA2QzU0LjU5NzQgMTkuNjc2MiA1My44MTA0IDIwLjc2NDEgNTIuNjY1OSAyMS41ODQ1QzUxLjUyMTMgMjIuNDA1IDUwLjEzNzEgMjIuODE1MSA0OC41MTMyIDIyLjgxNTFDNDcuMDY1NCAyMi44MTUxIDQ1Ljc2OTIgMjIuNDkwNiA0NC42MjQ2IDIxLjg0MTlDNDMuNDgwMSAyMS4xOTMzIDQyLjU5IDIwLjI2MjggNDEuOTU0IDE5LjA1MDVDNDEuMzE4MiAxNy44MzgyIDQxIDE2LjQyMTEgNDEgMTQuNzk5MUM0MSAxMy4xNTg0IDQxLjMxODIgMTEuNzMyIDQxLjk1NCAxMC41MTk2QzQyLjU5IDkuMzA4NTYgNDMuNDc1MiA4LjM4MzUzIDQ0LjYxMDEgNy43NDM5OEM0NS43NDQ4IDcuMTA0NjUgNDcuMDQ1OCA2Ljc4NTM0IDQ4LjUxMzIgNi43ODUzNFpNNDkuMDQxMiA4LjU1OTEzQzQ3LjI0MTMgOC41NTkxMyA0NS43OTgzIDkuMTE3MiA0NC43MTE5IDEwLjIzMzhDNDMuNjI2OSAxMS4zNTAzIDQzLjA4NDQgMTIuODcyMSA0My4wODQ0IDE0Ljc5OTFDNDMuMDg0NCAxNi43MjY1IDQzLjYyNjkgMTguMjQ4NCA0NC43MTE5IDE5LjM2NDlDNDUuNzk4MyAyMC40ODEyIDQ3LjI0MTMgMjEuMDM5MyA0OS4wNDEyIDIxLjAzOTNDNTAuMTc1OSAyMS4wMzkzIDUxLjE5ODEgMjAuNzgyIDUyLjEwNzEgMjAuMjY2OEM1My4wMTcxIDE5Ljc1MiA1My43MzE0IDE5LjAyMiA1NC4yNDk4IDE4LjA3NzJDNTQuNzY4IDE3LjEzMjUgNTUuMDI3IDE2LjA0IDU1LjAyNyAxNC43OTkxQzU1LjAyNyAxMy41NTg1IDU0Ljc2OCAxMi40NjY2IDU0LjI0OTggMTEuNTIyOEM1My43MzE0IDEwLjU3ODQgNTMuMDE3MSA5Ljg0NzYyIDUyLjEwNzEgOS4zMzE4NUM1MS4xOTgxIDguODE2NjYgNTAuMTc1OSA4LjU1OTEzIDQ5LjA0MTIgOC41NTkxM1pNNzAuMDgyMiA2Ljc4NTM0QzcxLjU0OTYgNi43ODUzNCA3Mi44NDU4IDcuMTA0NjUgNzMuOTcwNyA3Ljc0Mzk4Qzc1LjA5NTggOC4zODM1MyA3NS45NzY0IDkuMzA4NTYgNzYuNjEyNCAxMC41MTk2Qzc3LjI0ODIgMTEuNzMyIDc3LjU2NjIgMTMuMTU4NCA3Ny41NjYyIDE0Ljc5OTFDNzcuNTY2MiAxNi40MjExIDc3LjI0ODIgMTcuODM4MiA3Ni42MTI0IDE5LjA1MDVDNzUuOTc2NCAyMC4yNjI4IDc1LjA5MDYgMjEuMTkzMyA3My45NTYzIDIxLjg0MTlDNzIuODIxNiAyMi40OTA2IDcxLjUzMDEgMjIuODE1MSA3MC4wODIyIDIyLjgxNTFDNjguNDM4NyAyMi44MTUxIDY3LjA0OTggMjIuNDA1IDY1LjkxNSAyMS41ODQ1QzY0Ljc4MDIgMjAuNzY0MSA2My45OTc5IDE5LjY3NjIgNjMuNTY4MSAxOC4zMjA2VjMwSDYxLjUxMjlWNi45ODM4OEg2My41NjgxVjExLjI3NzlDNjMuOTk3OSA5LjkyMzU0IDY0Ljc4MDIgOC44MzYxNCA2NS45MTUgOC4wMTU2NkM2Ny4wNDk4IDcuMTk1MjkgNjguNDM4NyA2Ljc4NTM0IDcwLjA4MjIgNi43ODUzNFpNNjkuNTI1IDguNTU5MTNDNjguMzkwMiA4LjU1OTEzIDY3LjM2NzcgOC44MTY2NiA2Ni40NTc0IDkuMzMxODVDNjUuNTQ4NCA5Ljg0NzYyIDY0LjgzOTUgMTAuNTc4NCA2NC4zMzExIDExLjUyMjhDNjMuODIyNyAxMi40NjY2IDYzLjU2ODEgMTMuNTU4NSA2My41NjgxIDE0Ljc5OTFDNjMuNTY4MSAxNi4wNCA2My44MjI3IDE3LjEzMjUgNjQuMzMxMSAxOC4wNzcyQzY0LjgzOTUgMTkuMDIyIDY1LjU0ODQgMTkuNzUyIDY2LjQ1NzQgMjAuMjY2OEM2Ny4zNjc3IDIwLjc4MiA2OC4zOTAyIDIxLjAzOTMgNjkuNTI1IDIxLjAzOTNDNzEuMzQ0MyAyMS4wMzkzIDcyLjc5MjIgMjAuNDgxMiA3My44Njg4IDE5LjM2NDlDNzQuOTQ0MiAxOC4yNDg0IDc1LjQ4MTggMTYuNzI2NSA3NS40ODE4IDE0Ljc5OTFDNzUuNDgxOCAxMi44NzIxIDc0Ljk0NDIgMTEuMzUwMyA3My44Njg4IDEwLjIzMzhDNzIuNzkyMiA5LjExNzIgNzEuMzQ0MyA4LjU1OTEzIDY5LjUyNSA4LjU1OTEzWk04OS44MzIgNi43ODUzNEM5MS4yOTk2IDYuNzg1MzQgOTIuNTk1OCA3LjEwNDY1IDkzLjcyMDcgNy43NDM5OEM5NC44NDU5IDguMzgzNTMgOTUuNzI2NiA5LjMwODU2IDk2LjM2MjUgMTAuNTE5NkM5Ni45OTgyIDExLjczMiA5Ny4zMTYzIDEzLjE1ODQgOTcuMzE2MyAxNC43OTkxQzk3LjMxNjMgMTYuNDIxMSA5Ni45OTgyIDE3LjgzODIgOTYuMzYyNSAxOS4wNTA1Qzk1LjcyNjYgMjAuMjYyOCA5NC44NDEgMjEuMTkzMyA5My43MDYyIDIxLjg0MTlDOTIuNTcxNiAyMi40OTA2IDkxLjI4MDIgMjIuODE1MSA4OS44MzIgMjIuODE1MUM4OC4xODg3IDIyLjgxNTEgODYuNzk5OSAyMi40MDUgODUuNjY1MyAyMS41ODQ1Qzg0LjUzMDMgMjAuNzY0MSA4My43NDgyIDE5LjY3NjIgODMuMzE4NSAxOC4zMjA2VjMwSDgxLjI2MzFWNi45ODM4OEg4My4zMTg1VjExLjI3NzlDODMuNzQ4MiA5LjkyMzU0IDg0LjUzMDMgOC44MzYxNCA4NS42NjUzIDguMDE1NjZDODYuNzk5OSA3LjE5NTI5IDg4LjE4ODcgNi43ODUzNCA4OS44MzIgNi43ODUzNFpNODkuMjc1MiA4LjU1OTEzQzg4LjE0MDYgOC41NTkxMyA4Ny4xMTc3IDguODE2NjYgODYuMjA3NiA5LjMzMTg1Qzg1LjI5ODcgOS44NDc2MiA4NC41ODk5IDEwLjU3ODQgODQuMDgxMiAxMS41MjI4QzgzLjU3MjggMTIuNDY2NiA4My4zMTg1IDEzLjU1ODUgODMuMzE4NSAxNC43OTkxQzgzLjMxODUgMTYuMDQgODMuNTcyOCAxNy4xMzI1IDg0LjA4MTIgMTguMDc3MkM4NC41ODk5IDE5LjAyMiA4NS4yOTg3IDE5Ljc1MiA4Ni4yMDc2IDIwLjI2NjhDODcuMTE3NyAyMC43ODIgODguMTQwNiAyMS4wMzkzIDg5LjI3NTIgMjEuMDM5M0M5MS4wOTQ1IDIxLjAzOTMgOTIuNTQyNCAyMC40ODEyIDkzLjYxODggMTkuMzY0OUM5NC42OTQyIDE4LjI0ODQgOTUuMjMxOSAxNi43MjY1IDk1LjIzMTkgMTQuNzk5MUM5NS4yMzE5IDEyLjg3MjEgOTQuNjk0MiAxMS4zNTAzIDkzLjYxODggMTAuMjMzOEM5Mi41NDI0IDkuMTE3MiA5MS4wOTQ1IDguNTU5MTMgODkuMjc1MiA4LjU1OTEzWk0xMjAuMDU5IDYuNzU2ODNIMTIzLjkzM0wxMTkuNTYxIDIyLjYxNDRIMTE0Ljk4MkwxMTEuNDkgMTEuMDc5TDEwNy45MDkgMjIuNjE0NEgxMDMuMzMzTDk4Ljk4ODkgNi43NTY4M0gxMDMuMTI3TDEwNS43NjkgMTkuMDA3OUwxMDkuMzc3IDYuNzU2ODNIMTEzLjc0OUwxMTcuMzg5IDE5LjAwNzlMMTIwLjA1OSA2Ljc1NjgzWk0xMzAuMTI2IDkuNzg5NzlDMTMwLjczMiA4Ljc3ODg4IDEzMS41MzMgNy45ODIyNyAxMzIuNTMxIDcuMzk5NjNDMTMzLjUzIDYuODE4MzcgMTM0LjY0NSA2LjUyNzkyIDEzNS44NzcgNi41Mjc5MlYxMC44NDk4SDEzNC42NzRDMTMxLjY0MiAxMC44NDk4IDEzMC4xMjYgMTIuMjIzOCAxMzAuMTI2IDE0Ljk3MTNWMjIuNjE0NEgxMjUuOTg4VjYuNzU2ODNIMTMwLjEyNlY5Ljc4OTc5Wk0xMzcuNjk3IDIuMjAzNTZDMTM3LjY5NyAxLjU1NDk2IDEzNy45MzIgMS4wMjU3NSAxMzguNDAxIDAuNjE2MDI3QzEzOC44NzEgMC4yMDU0OTcgMTM5LjQ4NyAwIDE0MC4yNDkgMEMxNDEuMDEzIDAgMTQxLjYyOSAwLjIwNTQ5NyAxNDIuMDk5IDAuNjE2MDI3QzE0Mi41NjkgMS4wMjU3NSAxNDIuODAzIDEuNTU0OTYgMTQyLjgwMyAyLjIwMzU2QzE0Mi44MDMgMi44MzM0OSAxNDIuNTY5IDMuMzUzNzggMTQyLjA5OSAzLjc2NDY2QzE0MS42MjkgNC4xNzUzMSAxNDEuMDEzIDQuMzgwOCAxNDAuMjQ5IDQuMzgwOEMxMzkuNDg3IDQuMzgwOCAxMzguODcxIDQuMTc1MzEgMTM4LjQwMSAzLjc2NDY2QzEzNy45MzIgMy4zNTM3OCAxMzcuNjk3IDIuODMzNDkgMTM3LjY5NyAyLjIwMzU2Wk0xMzguMTY3IDYuNzU2ODNIMTQyLjMwNVYyMi42MTQ0SDEzOC4xNjdWNi43NTY4M1pNMTUzLjEzNCAxOS4xNUgxNTQuNzQ3VjIyLjYxNDRIMTUyLjU3NUMxNTAuNzU1IDIyLjYxNDQgMTQ5LjM2MSAyMi4xODU0IDE0OC4zOTMgMjEuMzI3MUMxNDcuNDI0IDIwLjQ2NzUgMTQ2Ljk0IDE5LjAzNjUgMTQ2Ljk0IDE3LjAzMzJWMTAuMTYyN0gxNDQuNjgxVjYuNzU2ODNIMTQ2Ljk0VjIuODM0MDdIMTUxLjA3OFY2Ljc1NjgzSDE1NC43MTdWMTAuMTYyN0gxNTEuMDc4VjE3LjA5QzE1MS4wNzggMTcuODUzNSAxNTEuMjM1IDE4LjM4ODIgMTUxLjU0OCAxOC42OTM1QzE1MS44NjEgMTguOTk3OSAxNTIuMzkgMTkuMTUgMTUzLjEzNCAxOS4xNVpNMTczIDE0LjA4MzdDMTczIDE0LjQ4NDggMTcyLjk1MiAxNC45NDMxIDE3Mi44NTQgMTUuNDU3OUgxNjAuOTM5QzE2MC45OTcgMTYuODcwMiAxNjEuMzg5IDE3LjkxMDUgMTYyLjExMyAxOC41NzgyQzE2Mi44MzcgMTkuMjQ1OSAxNjMuNzM3IDE5LjU3OTggMTY0LjgxMyAxOS41Nzk4QzE2NS43NzIgMTkuNTc5OCAxNjYuNTY5IDE5LjM1MDggMTY3LjIwMyAxOC44OTI1QzE2Ny44MzkgMTguNDM1NSAxNjguMjQ1IDE3LjgxNTkgMTY4LjQyMiAxNy4wMzMySDE3Mi43OTRDMTcyLjU4IDE4LjE0MDEgMTcyLjEyIDE5LjEzMjEgMTcxLjQxNiAyMC4wMDk2QzE3MC43MTEgMjAuODg4IDE2OS44MDYgMjEuNTc1MiAxNjguNzAyIDIyLjA3MTJDMTY3LjU5NiAyMi41NjcxIDE2Ni4zNjggMjIuODE1MSAxNjUuMDE5IDIyLjgxNTFDMTYzLjQzNCAyMi44MTUxIDE2Mi4wMjUgMjIuNDg2MSAxNjAuNzkyIDIxLjgyNzlDMTU5LjU2IDIxLjE2OTUgMTU4LjYwMiAyMC4yMjk2IDE1Ny45MTcgMTkuMDA3OUMxNTcuMjMyIDE3Ljc4NjMgMTU2Ljg4OSAxNi4zNDUzIDE1Ni44ODkgMTQuNjg1NkMxNTYuODg5IDEzLjAyNDggMTU3LjIzMiAxMS41NzkyIDE1Ny45MTcgMTAuMzQ5M0MxNTguNjAyIDkuMTE3OSAxNTkuNTYgOC4xNzc2OSAxNjAuNzkyIDcuNTI5MzJDMTYyLjAyNSA2Ljg4MDYxIDE2My40MzQgNi41NTYyIDE2NS4wMTkgNi41NTYyQzE2Ni42MjIgNi41NTYyIDE2OC4wMjYgNi44ODA2MSAxNjkuMjMgNy41MjkzMkMxNzAuNDMyIDguMTc3NjkgMTcxLjM2MiA5LjA3MDAzIDE3Mi4wMTcgMTAuMjA1NEMxNzIuNjcyIDExLjM0MDYgMTczIDEyLjYzMzQgMTczIDE0LjA4MzdaTTE2OC44MzMgMTMuNjg0M0MxNjguODkyIDEyLjM4NTQgMTY4LjU0NSAxMS40MDIgMTY3Ljc5MiAxMC43MzQ2QzE2Ny4wMzggMTAuMDY2NyAxNjYuMTE0IDkuNzMzIDE2NS4wMTkgOS43MzNDMTYzLjkwMyA5LjczMyAxNjIuOTY0IDEwLjA2NjcgMTYyLjIwMSAxMC43MzQ2QzE2MS40MzcgMTEuNDAyIDE2MS4wMTcgMTIuMzg1NCAxNjAuOTM5IDEzLjY4NDNIMTY4LjgzM1oiIGZpbGw9IiNGMDJFNjUiLz4KPHBhdGggZD0iTTEyLjM4NzEgMTEuMDQ3M0MxMi4zNzMgMTEuMDgxMyAxMi4xOTE2IDExLjc3NDUgMTEuOTk2OCAxMi41OTdDMTEuNzk0MiAxMy40MTkzIDExLjQ3MzQgMTQuNzE3NSAxMS4yOTIzIDE1LjQ4NTNDMTAuOTQzNCAxNi44OTIyIDEwLjczNDEgMTcuODE2NSAxMC43MzQxIDE3LjkzODdDMTAuNzM0MSAxNy45NzI1IDEwLjk1MDUgMTggMTEuMjE1MiAxOEgxMS42OTY4TDExLjkxMjcgMTcuMDYxOUMxMi4wMzg1IDE2LjU1MjQgMTIuMzE3NyAxNS4zODMzIDEyLjU0MDYgMTQuNDY1OEMxMi43NjQgMTMuNTQ4MyAxMy4wMzU3IDEyLjQzMzcgMTMuMTQwNSAxMS45ODQ5QzEzLjI0NTEgMTEuNTM2NCAxMy4zNDk4IDExLjEyOSAxMy4zNzA3IDExLjA4MTNDMTMuMzkxNiAxMS4wMjAyIDEzLjI3MjkgMTEgMTIuOTEwMiAxMUMxMi42MzgxIDExIDEyLjQwMDkgMTEuMDIwMiAxMi4zODcxIDExLjA0NzNaTTguNjQxNTkgMTMuOTg5OUw4IDE0LjY2OTdMOC4xODg1NiAxNC44ODcyQzguMjkyOSAxNS4wMDk0IDguNTc5MjYgMTUuMzE1MyA4LjgyMzE0IDE1LjU2N0w5LjI2OTYzIDE2LjAyODhIMTAuNTM5MUw5LjkzOTA2IDE1LjM5NjhDOS42MTEwNyAxNS4wNTc0IDkuMzM5MSAxNC43MzA4IDkuMzM5MSAxNC42OTAyQzkuMzM5MSAxNC42NDI2IDkuNTkwMjUgMTQuMzM3IDkuODk3NDIgMTQuMDEwNUMxMC4yMDQxIDEzLjY3NzggMTAuNDU1MyAxMy4zOTIgMTAuNDU1MyAxMy4zNTgxQzEwLjQ1NTMgMTMuMzMwNyAxMC4xOTAzIDEzLjMxMDUgOS44Njk1OCAxMy4zMTA1SDkuMjkwNTdMOC42NDE1OSAxMy45ODk5Wk0xMy41MjM4IDEzLjM1MTNDMTMuNTIzOCAxMy4zNzE4IDEzLjY0MjUgMTMuNTAwNiAxMy43ODg5IDEzLjY0MzRDMTQuMzMzMyAxNC4xNzM1IDE0LjcxNjcgMTQuNjIyMyAxNC42OTU2IDE0LjcxMDNDMTQuNjgyIDE0Ljc1ODMgMTQuNDE2NyAxNS4wNzc0IDE0LjA5NTkgMTUuNDEwNEwxMy41MTcxIDE2LjAyODhIMTQuMTY1NkwxNC44MTQyIDE2LjAyMjFMMTUuNDA2OCAxNS4zOUMxNS43MzUxIDE1LjAzNjkgMTYgMTQuNzIzOSAxNiAxNC42ODMzQzE2IDE0LjY0OTQgMTUuNzIxIDE0LjMyOTkgMTUuMzcyMSAxMy45Njk5TDE0Ljc0NDkgMTMuMzEwNUgxNC4xMzc3QzEzLjc5NTkgMTMuMzEwNSAxMy41MjM4IDEzLjMzMDcgMTMuNTIzOCAxMy4zNTEzWiIgZmlsbD0iI0YwMkU2NSIvPgo8L3N2Zz4K" width="173" height="30" class="img_ev3q"></a></td></tr></tbody></table></div></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--next" href="/installation/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Installation</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#features" class="table-of-contents__link toc-highlight">Features</a></li><li><a href="#gold-sponsors" class="table-of-contents__link toc-highlight">Gold Sponsors</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/installation/index.html b/installation/index.html index 918b3d90..8f2a877c 100644 --- a/installation/index.html +++ b/installation/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -45,7 +45,7 @@ default.</p></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="githu by the Arduino team:</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">name</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> Install Task</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">uses</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> arduino/setup</span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">task@v1</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>This installation method is community owned.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="build-from-source">Build From Source<a class="hash-link" href="#build-from-source" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="go-modules">Go Modules<a class="hash-link" href="#go-modules" title="Direct link to heading"></a></h3><p>First, make sure you have <a href="https://golang.org/" target="_blank" rel="noopener noreferrer">Go</a> properly installed and setup.</p><p>You can easily install the latest release globally by running:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">go </span><span class="token function" style="color:#8250DF">install</span><span class="token plain"> github.com/go-task/task/v3/cmd/task@latest</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Or you can install into another directory:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token function" style="color:#8250DF">env</span><span class="token plain"> </span><span class="token assign-left variable" style="color:#E36209">GOBIN</span><span class="token operator" style="color:#D73A49">=</span><span class="token plain">/bin go </span><span class="token function" style="color:#8250DF">install</span><span class="token plain"> github.com/go-task/task/v3/cmd/task@latest</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>If using Go 1.15 or earlier, instead use:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token function" style="color:#8250DF">env</span><span class="token plain"> </span><span class="token assign-left variable" style="color:#E36209">GO111MODULE</span><span class="token operator" style="color:#D73A49">=</span><span class="token plain">on go get -u github.com/go-task/task/v3/cmd/task@latest</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_S0QG"><p>For CI environments we recommend using the <a href="#get-the-binary">install script</a> instead, which is faster and more stable, since it'll just download the latest released binary.</p></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="setup-completions">Setup completions<a class="hash-link" href="#setup-completions" title="Direct link to heading"></a></h2><p>Download the autocompletion file corresponding to your shell.</p><p><a href="https://github.com/go-task/task/tree/master/completion" target="_blank" rel="noopener noreferrer">All completions are available on the Task repository</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="bash">Bash<a class="hash-link" href="#bash" title="Direct link to heading"></a></h3><p>First, ensure that you installed bash-completion using your package manager.</p><p>Make the completion file executable:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">chmod +x path/to/task.bash</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>After, add this to your <code>~/.bash_profile</code>:</p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token builtin class-name" style="color:#116329">source</span><span class="token plain"> path/to/task.bash</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="zsh">ZSH<a class="hash-link" href="#zsh" title="Direct link to heading"></a></h3><p>Put the <code>_task</code> file somewhere in your <code>$FPATH</code>:</p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token function" style="color:#8250DF">mv</span><span class="token plain"> path/to/_task /usr/local/share/zsh/site-functions/_task</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Ensure that the following is present in your <code>~/.zshrc</code>:</p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">autoload -U compinit</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">compinit -i</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>ZSH version 5.7 or later is recommended.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fish">Fish<a class="hash-link" href="#fish" title="Direct link to heading"></a></h3><p>Move the <code>task.fish</code> completion script:</p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token function" style="color:#8250DF">mv</span><span class="token plain"> path/to/task.fish ~/.config/fish/completions/task.fish</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="powershell">PowerShell<a class="hash-link" href="#powershell" title="Direct link to heading"></a></h3><p>Open your profile script with:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">notepad $profile</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Add the line and save the file:</p><div class="language-shell codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-shell codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">Invoke-Expression -Command path/to/task.ps1</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Home</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/usage/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Usage</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#package-managers" class="table-of-contents__link toc-highlight">Package Managers</a><ul><li><a href="#homebrew" class="table-of-contents__link toc-highlight">Homebrew</a></li><li><a href="#snap" class="table-of-contents__link toc-highlight">Snap</a></li><li><a href="#chocolatey" class="table-of-contents__link toc-highlight">Chocolatey</a></li><li><a href="#scoop" class="table-of-contents__link toc-highlight">Scoop</a></li><li><a href="#aur" class="table-of-contents__link toc-highlight">AUR</a></li><li><a href="#fedora" class="table-of-contents__link toc-highlight">Fedora</a></li><li><a href="#nix" class="table-of-contents__link toc-highlight">Nix</a></li><li><a href="#npm" class="table-of-contents__link toc-highlight">npm</a></li></ul></li><li><a href="#get-the-binary" class="table-of-contents__link toc-highlight">Get The Binary</a><ul><li><a href="#binary" class="table-of-contents__link toc-highlight">Binary</a></li><li><a href="#install-script" class="table-of-contents__link toc-highlight">Install Script</a></li><li><a href="#github-actions" class="table-of-contents__link toc-highlight">GitHub Actions</a></li></ul></li><li><a href="#build-from-source" class="table-of-contents__link toc-highlight">Build From Source</a><ul><li><a href="#go-modules" class="table-of-contents__link toc-highlight">Go Modules</a></li></ul></li><li><a href="#setup-completions" class="table-of-contents__link toc-highlight">Setup completions</a><ul><li><a href="#bash" class="table-of-contents__link toc-highlight">Bash</a></li><li><a href="#zsh" class="table-of-contents__link toc-highlight">ZSH</a></li><li><a href="#fish" class="table-of-contents__link toc-highlight">Fish</a></li><li><a href="#powershell" class="table-of-contents__link toc-highlight">PowerShell</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/releasing/index.html b/releasing/index.html index 1feb91a8..ced8430d 100644 --- a/releasing/index.html +++ b/releasing/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -34,7 +34,7 @@ If you think its Task version is outdated, open an issue to let us know.</p><h1> of updating versions there by editing <a href="https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/tools/go-task/default.nix" target="_blank" rel="noopener noreferrer">this file</a>. If you think its Task version is outdated, open an issue to let us know.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/contributing/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Contributing</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/taskfile-versions/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Taskfile Versions</div></a></nav></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/search/index.html b/search/index.html index 2797130d..fc8bc1b3 100644 --- a/search/index.html +++ b/search/index.html @@ -11,13 +11,13 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> <script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus"> <div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/logo.svg" alt="Task Logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/logo.svg" alt="Task Logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Task</b></a><a class="navbar__item navbar__link" href="/installation/">Installation</a><a class="navbar__item navbar__link" href="/usage/">Usage</a><a class="navbar__item navbar__link" href="/api/">API</a><a class="navbar__item navbar__link" href="/donate/">Donate</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="container margin-vert--lg"><h1>Search the documentation</h1><form class="row"><div class="col searchQueryColumn_RTkw col--12"><input type="search" name="q" class="searchQueryInput_u2C7" placeholder="Type your search here" aria-label="Search" autocomplete="off" autofocus=""></div></form><div class="row"><div class="col col--8 searchResultsColumn_JPFH"></div><div class="col col--4 text--right searchLogoColumn_rJIA"><a target="_blank" rel="noopener noreferrer" href="https://www.algolia.com/" aria-label="Search by Algolia"><svg viewBox="0 0 168 24" class="algoliaLogo_rT1R"><g fill="none"><path class="algoliaLogoPathFill_WdUC" d="M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"></path><path fill="#5468FF" d="M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"></path><path fill="white" d="M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"></path></g></svg></a></div></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/styleguide/index.html b/styleguide/index.html index b33f45d4..da984f92 100644 --- a/styleguide/index.html +++ b/styleguide/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -24,7 +24,7 @@ need or want to. Also, feel free to open issues or pull requests with improvements to this guide.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="use-taskfileyml-and-not-taskfileyml">Use <code>Taskfile.yml</code> and not <code>taskfile.yml</code><a class="hash-link" href="#use-taskfileyml-and-not-taskfileyml" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">taskfile.yml</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">Taskfile.yml</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>This is important especially for Linux users. Windows and macOS have case insensitive filesystems, so <code>taskfile.yml</code> will end up working, even that not officially supported. On Linux, only <code>Taskfile.yml</code> will work, though.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="use-the-correct-order-of-keywords">Use the correct order of keywords<a class="hash-link" href="#use-the-correct-order-of-keywords" title="Direct link to heading"></a></h2><ul><li><code>version:</code></li><li><code>includes:</code></li><li>Configuration ones, like <code>output:</code>, <code>silent:</code>, <code>method:</code> and <code>run:</code></li><li><code>vars:</code></li><li><code>env:</code>, <code>dotenv:</code></li><li><code>tasks:</code></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="use-2-spaces-for-indentation">Use 2 spaces for indentation<a class="hash-link" href="#use-2-spaces-for-indentation" title="Direct link to heading"></a></h2><p>This is the most common convention for YAML files, and Task follows it.</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'foo'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'foo'</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="separate-with-spaces-the-mains-sections">Separate with spaces the mains sections<a class="hash-link" href="#separate-with-spaces-the-mains-sections" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">includes</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">docker</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> ./docker/Taskfile.yml</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">output</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> prefixed</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">vars</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">FOO</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> bar</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">env</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">BAR</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> baz</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token comment" style="color:#6B6B6B;font-style:italic"># ...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">includes</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">docker</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> ./docker/Taskfile.yml</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">output</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> prefixed</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">vars</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">FOO</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> bar</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">env</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">BAR</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> baz</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token comment" style="color:#6B6B6B;font-style:italic"># ...</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="add-spaces-between-tasks">Add spaces between tasks<a class="hash-link" href="#add-spaces-between-tasks" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'foo'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">bar</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'bar'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">baz</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'baz'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">foo</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'foo'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">bar</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'bar'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">baz</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'baz'</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="use-upper-case-variable-names">Use upper-case variable names<a class="hash-link" href="#use-upper-case-variable-names" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">vars</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">binary_name</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> myapp</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">build</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> go build </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">o </span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain">.binary_name</span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"> .</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">vars</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">BINARY_NAME</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> myapp</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">build</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> go build </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">o </span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain">.BINARY_NAME</span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"> .</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="dont-wrap-vars-in-spaces-when-templating">Don't wrap vars in spaces when templating<a class="hash-link" href="#dont-wrap-vars-in-spaces-when-templating" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">greet</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo '</span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"> .MESSAGE </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain">'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">greet</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo '</span><span class="token punctuation" style="color:#393A34">{</span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain">.MESSAGE</span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain">'</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>This convention is also used by most people for any Go templating.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="separate-task-name-words-with-a-dash">Separate task name words with a dash<a class="hash-link" href="#separate-task-name-words-with-a-dash" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># bad</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">do_something_fancy</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'Do something'</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">do-something-fancy</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> echo 'Do something'</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="use-colon-for-task-namespacing">Use colon for task namespacing<a class="hash-link" href="#use-colon-for-task-namespacing" title="Direct link to heading"></a></h2><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#6B6B6B;font-style:italic"># good</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">docker:build</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> docker </span><span class="token punctuation" style="color:#393A34">...</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">docker:run</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> docker</span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">compose </span><span class="token punctuation" style="color:#393A34">...</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>This is also done automatically when using included Taskfiles.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/faq/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">FAQ</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/changelog/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Changelog</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#use-taskfileyml-and-not-taskfileyml" class="table-of-contents__link toc-highlight">Use <code>Taskfile.yml</code> and not <code>taskfile.yml</code></a></li><li><a href="#use-the-correct-order-of-keywords" class="table-of-contents__link toc-highlight">Use the correct order of keywords</a></li><li><a href="#use-2-spaces-for-indentation" class="table-of-contents__link toc-highlight">Use 2 spaces for indentation</a></li><li><a href="#separate-with-spaces-the-mains-sections" class="table-of-contents__link toc-highlight">Separate with spaces the mains sections</a></li><li><a href="#add-spaces-between-tasks" class="table-of-contents__link toc-highlight">Add spaces between tasks</a></li><li><a href="#use-upper-case-variable-names" class="table-of-contents__link toc-highlight">Use upper-case variable names</a></li><li><a href="#dont-wrap-vars-in-spaces-when-templating" class="table-of-contents__link toc-highlight">Don't wrap vars in spaces when templating</a></li><li><a href="#separate-task-name-words-with-a-dash" class="table-of-contents__link toc-highlight">Separate task name words with a dash</a></li><li><a href="#use-colon-for-task-namespacing" class="table-of-contents__link toc-highlight">Use colon for task namespacing</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/taskfile-versions/index.html b/taskfile-versions/index.html index 393ec44a..68d4b7a8 100644 --- a/taskfile-versions/index.html +++ b/taskfile-versions/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -39,7 +39,7 @@ included Taskfile will run:</li></ul><div class="language-yaml codeBlockContaine to understand. The <code>expansions:</code> setting was removed as it became unncessary. This is the order in which Task will process variables, each level can see the variables set by the previous one and override those.<ul><li>Environment variables</li><li>Global + CLI variables</li><li>Call variables</li><li>Task variables</li></ul></li></ul></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/releasing/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Releasing</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/donate/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Donate</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#what-the-taskfile-version-mean" class="table-of-contents__link toc-highlight">What the Taskfile version mean</a></li><li><a href="#version-1" class="table-of-contents__link toc-highlight">Version 1</a></li><li><a href="#version-20" class="table-of-contents__link toc-highlight">Version 2.0</a></li><li><a href="#version-21" class="table-of-contents__link toc-highlight">Version 2.1</a></li><li><a href="#version-22" class="table-of-contents__link toc-highlight">Version 2.2</a></li><li><a href="#version-26" class="table-of-contents__link toc-highlight">Version 2.6</a></li><li><a href="#version-3" class="table-of-contents__link toc-highlight">Version 3</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file diff --git a/usage/index.html b/usage/index.html index 40b552a5..14b3a3a3 100644 --- a/usage/index.html +++ b/usage/index.html @@ -11,7 +11,7 @@ <link rel="search" type="application/opensearchdescription+xml" title="Task" href="/opensearch.xml"> <script src="/js/carbon.js" async></script><link rel="stylesheet" href="/assets/css/styles.d5e5d7d5.css"> -<link rel="preload" href="/assets/js/runtime~main.281cdeaf.js" as="script"> +<link rel="preload" href="/assets/js/runtime~main.42fd07f1.js" as="script"> <link rel="preload" href="/assets/js/main.0c0ea02c.js" as="script"> </head> <body class="navigation-with-keyboard"> @@ -103,9 +103,9 @@ variables as part of the task's label, and it will be considered a differen task.</p><p>This is useful if you want to run a task once for each distinct set of inputs until the sources actually change. For example, if the sources depend on the value of a variable, or you if you want the task to rerun if some arguments -change even if the source has not.</p></div></div><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_S0QG"><p>The method <code>none</code> skips any validation and always run the task.</p></div></div><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>For the <code>checksum</code> (default) method to work, it is only necessary to -inform the source files, but if you want to use the <code>timestamp</code> method, you -also need to inform the generated files with <code>generates</code>.</p></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="using-programmatic-checks-to-indicate-a-task-is-up-to-date">Using programmatic checks to indicate a task is up to date.<a class="hash-link" href="#using-programmatic-checks-to-indicate-a-task-is-up-to-date" title="Direct link to heading"></a></h3><p>Alternatively, you can inform a sequence of tests as <code>status</code>. If no error +change even if the source has not.</p></div></div><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_S0QG"><p>The method <code>none</code> skips any validation and always run the task.</p></div></div><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>For the <code>checksum</code> (default) or <code>timestamp</code> method to work, it is only necessary to +inform the source files. +When the <code>timestamp</code> method is used, the last time of the running the task is considered as a generate.</p></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="using-programmatic-checks-to-indicate-a-task-is-up-to-date">Using programmatic checks to indicate a task is up to date.<a class="hash-link" href="#using-programmatic-checks-to-indicate-a-task-is-up-to-date" title="Direct link to heading"></a></h3><p>Alternatively, you can inform a sequence of tests as <code>status</code>. If no error is returned (exit status 0), the task is considered up-to-date:</p><div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token key atrule" style="color:#22863A">version</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#C6105F">'3'</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token key atrule" style="color:#22863A">tasks</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">generate-files</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">cmds</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> mkdir directory</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> touch directory/file1.txt</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> touch directory/file2.txt</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token comment" style="color:#6B6B6B;font-style:italic"># test existence of files</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token key atrule" style="color:#22863A">status</span><span class="token punctuation" style="color:#393A34">:</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> test </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">d directory</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> test </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">f directory/file1.txt</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain"> test </span><span class="token punctuation" style="color:#393A34">-</span><span class="token plain">f directory/file2.txt</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Normally, you would use <code>sources</code> in combination with <code>generates</code> - but for tasks that generate remote artifacts (Docker images, deploys, CD releases) the checksum source and timestamps require either @@ -197,7 +197,7 @@ and run the task again. This requires the <code>sources</code> attribute to be g so task knows which files to watch.</p><p>The default watch interval is 5 seconds, but it's possible to change it by either setting <code>interval: '500ms'</code> in the root of the Taskfile passing it as an argument like <code>--interval=500ms</code>.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/installation/"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Installation</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/api/"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">API Reference</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#getting-started" class="table-of-contents__link toc-highlight">Getting started</a></li><li><a href="#supported-file-names" class="table-of-contents__link toc-highlight">Supported file names</a><ul><li><a href="#running-a-taskfile-from-a-subdirectory" class="table-of-contents__link toc-highlight">Running a Taskfile from a subdirectory</a></li></ul></li><li><a href="#environment-variables" class="table-of-contents__link toc-highlight">Environment variables</a><ul><li><a href="#task" class="table-of-contents__link toc-highlight">Task</a></li><li><a href="#env-files" class="table-of-contents__link toc-highlight">.env files</a></li></ul></li><li><a href="#including-other-taskfiles" class="table-of-contents__link toc-highlight">Including other Taskfiles</a><ul><li><a href="#os-specific-taskfiles" class="table-of-contents__link toc-highlight">OS-specific Taskfiles</a></li><li><a href="#directory-of-included-taskfile" class="table-of-contents__link toc-highlight">Directory of included Taskfile</a></li><li><a href="#optional-includes" class="table-of-contents__link toc-highlight">Optional includes</a></li><li><a href="#internal-includes" class="table-of-contents__link toc-highlight">Internal includes</a></li><li><a href="#vars-of-included-taskfiles" class="table-of-contents__link toc-highlight">Vars of included Taskfiles</a></li><li><a href="#namespace-aliases" class="table-of-contents__link toc-highlight">Namespace aliases</a></li></ul></li><li><a href="#internal-tasks" class="table-of-contents__link toc-highlight">Internal tasks</a></li><li><a href="#task-directory" class="table-of-contents__link toc-highlight">Task directory</a></li><li><a href="#task-dependencies" class="table-of-contents__link toc-highlight">Task dependencies</a></li><li><a href="#platform-specific-tasks-and-commands" class="table-of-contents__link toc-highlight">Platform specific tasks and commands</a></li><li><a href="#calling-another-task" class="table-of-contents__link toc-highlight">Calling another task</a></li><li><a href="#prevent-unnecessary-work" class="table-of-contents__link toc-highlight">Prevent unnecessary work</a><ul><li><a href="#by-fingerprinting-locally-generated-files-and-their-sources" class="table-of-contents__link toc-highlight">By fingerprinting locally generated files and their sources</a></li><li><a href="#using-programmatic-checks-to-indicate-a-task-is-up-to-date" class="table-of-contents__link toc-highlight">Using programmatic checks to indicate a task is up to date.</a></li><li><a href="#using-programmatic-checks-to-cancel-the-execution-of-a-task-and-its-dependencies" class="table-of-contents__link toc-highlight">Using programmatic checks to cancel the execution of a task and its dependencies</a></li><li><a href="#limiting-when-tasks-run" class="table-of-contents__link toc-highlight">Limiting when tasks run</a></li></ul></li><li><a href="#variables" class="table-of-contents__link toc-highlight">Variables</a><ul><li><a href="#dynamic-variables" class="table-of-contents__link toc-highlight">Dynamic variables</a></li></ul></li><li><a href="#forwarding-cli-arguments-to-commands" class="table-of-contents__link toc-highlight">Forwarding CLI arguments to commands</a></li><li><a href="#doing-task-cleanup-with-defer" class="table-of-contents__link toc-highlight">Doing task cleanup with <code>defer</code></a></li><li><a href="#gos-template-engine" class="table-of-contents__link toc-highlight">Go's template engine</a></li><li><a href="#help" class="table-of-contents__link toc-highlight">Help</a></li><li><a href="#display-summary-of-task" class="table-of-contents__link toc-highlight">Display summary of task</a></li><li><a href="#task-aliases" class="table-of-contents__link toc-highlight">Task aliases</a></li><li><a href="#overriding-task-name" class="table-of-contents__link toc-highlight">Overriding task name</a></li><li><a href="#silent-mode" class="table-of-contents__link toc-highlight">Silent mode</a></li><li><a href="#dry-run-mode" class="table-of-contents__link toc-highlight">Dry run mode</a></li><li><a href="#ignore-errors" class="table-of-contents__link toc-highlight">Ignore errors</a></li><li><a href="#output-syntax" class="table-of-contents__link toc-highlight">Output syntax</a></li><li><a href="#interactive-cli-application" class="table-of-contents__link toc-highlight">Interactive CLI application</a></li><li><a href="#short-task-syntax" class="table-of-contents__link toc-highlight">Short task syntax</a></li><li><a href="#set-and-shopt" class="table-of-contents__link toc-highlight"><code>set</code> and <code>shopt</code></a></li><li><a href="#watch-tasks" class="table-of-contents__link toc-highlight">Watch tasks</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Pages</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/installation/">Installation</a></li><li class="footer__item"><a class="footer__link-item" href="/usage/">Usage</a></li><li class="footer__item"><a class="footer__link-item" href="/donate/">Donate</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/go-task/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://twitter.com/taskfiledev" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://fosstodon.org/@task" target="_blank" rel="noopener noreferrer" class="footer__link-item">Mastodon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/6TY36E39UK" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://opencollective.com/task" target="_blank" rel="noopener noreferrer" class="footer__link-item">OpenCollective<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">Translations</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://task-zh.readthedocs.io/zh_CN/latest/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Chinese | 中国人<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div></footer></div> -<script src="/assets/js/runtime~main.281cdeaf.js"></script> +<script src="/assets/js/runtime~main.42fd07f1.js"></script> <script src="/assets/js/main.0c0ea02c.js"></script> </body> </html> \ No newline at end of file