Compare commits

..

1850 Commits
v3.2.2 ... main

Author SHA1 Message Date
renovate[bot]
b27a6653f6 chore(deps): update all non-major dependencies (#2816)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2026-05-17 12:40:51 +02:00
renovate[bot]
76269b03c4 chore(deps): update pnpm to v11 (#2844)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2026-05-17 12:20:33 +02:00
renovate[bot]
ed492ac862 chore(deps): update pnpm/action-setup digest to 0e279bb (#2843)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-17 11:59:56 +02:00
dependabot[bot]
1d385ad5b4 chore(deps): bump vite from 5.4.19 to 5.4.21 in /website (#2841)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-17 11:59:42 +02:00
Andrey Nering
2eff3545d9 ci(goreleaser): add missing env to workflow 2026-05-16 18:09:51 -03:00
Andrey Nering
bd79c29a39 v3.51.1 2026-05-16 17:51:05 -03:00
Andrey Nering
136e0dae89 ci: fix goreleaser 2026-05-16 17:50:34 -03:00
Andrey Nering
41a2137044 v3.51.0 2026-05-16 17:27:25 -03:00
imgbot[bot]
aea7f7a713 docs: optimize images (#2690) 2026-05-16 17:23:46 -03:00
renovate[bot]
c3e16b0a68 chore(deps): update mvdan.cc/sh/v3 digest to f5c6e27 (#2834) 2026-05-16 17:20:20 -03:00
renovate[bot]
19699a1f0e chore(deps): update pnpm/action-setup digest to 739bfe4 (#2835)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-11 16:27:48 +02:00
Timothy Rule
9e3ff27ba1 fix: avoid panic after calling WordsSeq (#2810) 2026-05-09 21:42:00 +00:00
renovate[bot]
de05ebc503 chore(deps): update goreleaser/goreleaser-action digest to 1a80836 (#2815) 2026-05-09 21:34:39 +00:00
Andrey Nering
6e154f2b71 docs(changelog): add entry for #2832 2026-05-09 18:28:46 -03:00
Andrey Nering
9ba1e566a9 fix: update mvdan.cc/sh to fix regression
* Closes #2812
* Closes #2818
* Ref https://github.com/mvdan/sh/pull/1330
2026-05-09 18:28:46 -03:00
Andrey Nering
1b53d425ee ci(govulncheck): update golang.org/x/net 2026-05-09 11:45:53 -03:00
Andrey Nering
7b3559ce4c ci: fix build and lint builds 2026-05-09 11:45:53 -03:00
Andrey Nering
43dbeb4260 docs(changelog): add entry for #2406 #2408 2026-05-09 11:25:49 -03:00
Jerry Wiltse
d9e0e04725 feat: add joinEnv and joinUrl string functions and 2 new system vars (#2408) 2026-05-09 14:19:33 +00:00
Andrey Nering
629a10813f chore: update minimal go version to go 1.25.10 2026-05-09 11:19:02 -03:00
Andrey Nering
dc64864643 docs: add security > threat model page (#2830) 2026-05-09 13:59:36 +00:00
renovate[bot]
5f78da2d0a chore(deps): update dependency netlify-cli to v26 (#2823)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-05 03:03:32 +02:00
renovate[bot]
7915b78ac2 chore(deps): update pnpm/action-setup action to v6 (#2824)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-05 03:03:13 +02:00
Andrey Nering
3441bf522e docs(changelog): add entry for #2820 2026-05-01 10:03:53 -03:00
Roman Dahm
46f5db22c8 perf(templater): skip template engine for strings without {{ (#2820) 2026-05-01 09:57:16 -03:00
Ludovic Fernandez
ecffcc720f chore(golangci-lint): improve and clean configuration (#2808) 2026-04-23 21:13:15 -03:00
Valentin Maerten
be35b3af75 feat(website): highlight big orgs / projects that use Task (#2803) 2026-04-22 10:02:06 +02:00
renovate[bot]
3aaedc790d chore(deps): update goreleaser/goreleaser-action digest to e24998b (#2804)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 22:49:24 +02:00
renovate[bot]
0b19d973ac chore(deps): update all non-major dependencies (#2805)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 22:08:05 +02:00
Andreas **Felix** Häberle
70b6cd8ee0 docs: add call internal task within a task example (#2789)
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2026-04-20 21:58:42 +02:00
Valentin Maerten
1eb5720e7e chore: changelog for #2788 2026-04-20 21:53:50 +02:00
Mateen Anjum
1b06da16f6 feat(templater): add absPath template function (#2788)
Signed-off-by: Mateen Anjum <mateenali66@gmail.com>
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2026-04-20 21:50:03 +02:00
Andrey Nering
6e37e3d7a7 chore(website): remove controls to copy page content
This is part of the LLM plugin. It's distracting and not really useful.

We're keeping the markdown version of the pages, tho. Just append `.md`
to any page to see the markdown version.
2026-04-15 16:39:20 -03:00
Pete Davison
4bea638b05 feat: add security docs to website and update contributing (#2799) 2026-04-15 20:34:38 +01:00
Pete Davison
8f2d17a387 feat: use GH_PAT for goreleaser (#2797) 2026-04-15 13:33:57 +00:00
Andrey Nering
f7d17fffad chore(website): update my bluesky handle 2026-04-15 10:16:02 -03:00
Pete Davison
697ef35303 feat: add permissions to actions (#2796) 2026-04-15 13:27:23 +01:00
Andrey Nering
8fe3d048fa docs: document and add blog post about go tool task (#2791) 2026-04-14 22:47:45 -03:00
Andrey Nering
d61d92dfdf v3.50.0 2026-04-13 17:54:26 -03:00
renovate[bot]
114ac1eedc chore(deps): update actions/github-script action to v9 (#2787)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 10:49:13 -03:00
renovate[bot]
a016b7b72b chore(deps): update all non-major dependencies (#2786)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 10:48:30 -03:00
Andrey Nering
219bf3e5a5 chore: add nolint annotations for gosec linter
Add //nolint:gosec annotations for intentional code patterns
that are safe in context (path traversal in release tool,
uintptr conversion for terminals, weak rand in tests,
TLS skip verify for user-configured insecure mode).

Assisted-by: Kimi-K2.5 via Crush <crush@charm.land>
2026-04-13 10:46:19 -03:00
Andrey Nering
b36fcfd8bb chore(golangci-lint): exclude gosec G306 for file permissions
This allows using 0644 file permissions without linter warnings.

Assisted-by: Kimi-K2.5 via Crush <crush@charm.land>
2026-04-13 10:46:19 -03:00
Andrey Nering
ef8fb84c8f chore(golangci-lint): enable gosec linter 2026-04-13 10:46:19 -03:00
Andrey Nering
ddecd51715 ci: add security action with govulncheck 2026-04-13 10:46:19 -03:00
Andrey Nering
88fc6d4f24 ci: pin action by commit hash 2026-04-13 10:46:19 -03:00
Andrey Nering
07fbd9887e docs(changelog): add entry for #2716 2026-04-11 21:45:48 -03:00
Doug Richardson
f2e32beabd fix: re-run task when generated files are missing with method: timestamp (#2716) 2026-04-11 21:42:50 -03:00
dependabot[bot]
8fa9dc04ac chore(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.97.1 to 1.97.3 (#2778)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 06:24:22 +00:00
renovate[bot]
0c98f1ad13 chore(deps): update all non-major dependencies (#2775)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-09 06:16:22 +00:00
Valentin Maerten
a12cc6e843 chore: changelog for #2764 2026-04-09 08:16:03 +02:00
Mateen Anjum
44e1350d0c fix: handle SIGHUP in watcher (#2764) 2026-04-09 08:15:37 +02:00
dependabot[bot]
2973dd75f9 chore(deps): bump go.opentelemetry.io/otel/sdk from 1.40.0 to 1.43.0 (#2779)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 08:07:58 +02:00
dependabot[bot]
a10f1d2ee7 chore(deps): bump google.golang.org/grpc from 1.78.0 to 1.79.3 (#2750)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 15:02:49 +00:00
dependabot[bot]
f727b55fbc chore(deps): bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 (#2771)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 11:58:01 -03:00
renovate[bot]
363153cbf3 chore(deps): update pnpm/action-setup action to v5 (#2766)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-02 18:59:00 +02:00
Valentin Maerten
6b436eda48 fix: Windows CI test failures and path normalization (#2670) 2026-03-28 10:39:13 +01:00
Valentin Maerten
2ddebca4e1 docs: add AI usage disclosure policy (#2755) 2026-03-28 10:30:54 +01:00
renovate[bot]
b6ab6153a2 chore(deps): update all non-major dependencies (#2728)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-28 10:28:52 +01:00
Rohan Santhosh Kumar
bca99520bf docs: use dependent in gentle force docs (#2756)
Co-authored-by: rohan436 <rohan.santhoshkumar@googlemail.com>
2026-03-28 10:24:36 +01:00
Pete Davison
1312ee8a81 fix: typo in workflow 2026-03-23 20:06:17 +00:00
Pete Davison
b7cb204f10 feat: test adjustments to issue-experiment workflow 2026-03-23 20:01:06 +00:00
renovate[bot]
921f84157a chore(deps): update go-task/setup-task action to v2 (#2759)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 08:39:36 +01:00
Valentin Maerten
470ef30f8f chore: changelog for #2730 2026-03-21 11:41:47 +01:00
Sergio
87b12e663e fix(fish): honor GO_TASK_PROGNAME for experiments cache (#2730) 2026-03-21 11:37:51 +01:00
Valentin Maerten
e61700f36d chore: changelog for #2678 2026-03-21 11:37:12 +01:00
Valentin Maerten
8b6aca5722 feat(requires): support variable references in enum constraints (#2678) 2026-03-21 11:32:02 +01:00
Sergio
19d8fae5f9 docs: correct stdin Taskfile command example (#2738) 2026-03-18 20:48:57 +00:00
Valentin Maerten
c387048f8f feat(website): add APK (Alpine Linux) to official package managers
Add Alpine Linux APK installation instructions via Cloudsmith and move
the Cloudsmith hosting info block above the package manager sections.
2026-03-18 21:42:17 +01:00
Valentin Maerten
f2b3ba1263 feat(website): add community sponsors section with Cloudsmith (#2748) 2026-03-17 22:00:48 +01:00
renovate[bot]
2139e32426 chore(deps): update dependency netlify-cli to v24 (#2729)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-17 21:51:27 +01:00
renovate[bot]
d4e168128b chore(deps): update pnpm/action-setup digest to fc06bc1 (#2744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-17 21:51:01 +01:00
Andrey Nering
54bdcba369 ci: update to go 1.26 (#2724) 2026-03-08 17:25:37 -03:00
Andrey Nering
c55c969474 docs: update changelog 2026-03-08 17:11:49 -03:00
Andrey Nering
73f9879421 docs: bring back line commented out by mistake 2026-03-08 17:05:32 -03:00
Andrey Nering
aa83651da2 v3.49.1 2026-03-08 17:01:25 -03:00
Andrey Nering
4ddad9f9f7 Revert "fix: Call ReplaceVars() to resolve Ref's for imported global vars." (#2723) 2026-03-08 20:00:12 +00:00
Jannis
080ee8869f docs: schema: add tasks.task.method (#2718) 2026-03-08 11:45:27 +01:00
Andrey Nering
af943b064b ci: fix netlify prod deploy after release 2026-03-07 20:02:53 -03:00
Andrey Nering
962eada344 docs: update releasing guide
We have now more package managers being released automatically by
GoReleaser. Only Snapcraft still require manual steps.
2026-03-07 19:42:03 -03:00
Andrey Nering
a0d9750edf docs(changelog): fix case: git -> Git 2026-03-07 19:26:22 -03:00
Andrey Nering
a1b8985df0 v3.49.0 2026-03-07 19:20:58 -03:00
dependabot[bot]
21daf6160a chore(deps): bump go.opentelemetry.io/otel/sdk from 1.39.0 to 1.40.0 (#2712)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 19:49:38 -03:00
renovate[bot]
c70d28f7b8 chore(deps): update actions/upload-artifact action to v7 (#2714)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 19:48:51 -03:00
Andrey Nering
90e6ef88dc security: pin github actions by commit (#2719) 2026-03-06 19:20:25 -03:00
renovate[bot]
a788034148 chore(deps): update all non-major dependencies (#2713)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-06 22:32:30 +01:00
Timothy Rule
90bcbe9ba5 fix: address "taskfile not found" in some environments like docker (#2709) 2026-02-27 09:47:59 -03:00
Andrey Nering
60a808ca23 docs(readme): update | to 2026-02-23 17:26:14 -03:00
renovate[bot]
edc80aed81 chore(deps): update goreleaser/goreleaser-action action to v7 (#2706)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-23 15:35:02 -03:00
renovate[bot]
68bea7f273 chore(deps): update pnpm to v10.30.1 (#2705)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-23 15:34:23 -03:00
Valentin Maerten
c62f9c7147 fix(build): exclude unsupported windows/arm target 2026-02-21 15:18:04 +01:00
Valentin Maerten
c4ecff753d chore: changelog for #2607 2026-02-18 19:00:15 +01:00
Valentin Maerten
2ed77716be feat(config): add environment variable support for all taskrc options (#2607) 2026-02-18 18:58:13 +01:00
Valentin Maerten
a2f8e144ca chore: changelog for #2632 2026-02-18 18:57:53 +01:00
Timothy Rule
2cdd7d3e43 fix: Call ReplaceVars() to resolve Ref's for imported global vars. (#2632) 2026-02-18 18:55:20 +01:00
Andrey Nering
56b316a124 ci: fix lint 2026-02-17 15:43:13 -03:00
renovate[bot]
39ce6a21ac chore(deps): update all non-major dependencies 2026-02-17 15:43:13 -03:00
Andrey Nering
fc5f6fa3aa fix: pin yaml package to v3 for now (#2693) 2026-02-17 15:29:51 -03:00
Valentin Maerten
44a2f2e5f5 docs: add Cloudsmith attribution for deb/rpm package hosting 2026-02-15 17:22:01 +01:00
Valentin Maerten
d356c649aa chore: changelog for #2682 2026-02-15 17:01:02 +01:00
Valentin Maerten
ca24d32f37 chore: changelog for #2669 2026-02-15 14:56:52 +01:00
Timothy Rule
f63a63fa6c fix: improve error message when searching for Taskfile. (#2682) 2026-02-15 14:56:35 +01:00
renovate[bot]
c0ff7105e7 chore(deps): update peter-evans/find-comment action to v4 (#2684)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-15 14:49:49 +01:00
Valentin Maerten
8b063d6b92 fix(git): check cache before context timeout in getOrCloneRepo (#2669) 2026-02-15 14:46:55 +01:00
Valentin Maerten
dc8ac5e79f chore: changelog for #2686 2026-02-15 14:45:47 +01:00
Timothy Rule
df7810ab63 fix: copy watch when merging tasks during import (#2686) 2026-02-15 14:42:59 +01:00
Pete Davison
82783417ea docs: update integration doc with details of extension config namespace change (#2428)
* docs: update integration doc with details of extension config namespace change

* docs: add descriptions of sorting modes
2026-02-14 20:47:06 +00:00
renovate[bot]
d5bed6b716 chore(deps): update peter-evans/create-or-update-comment action to v5 (#2673)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-02 09:42:48 +01:00
renovate[bot]
c8f722c0d5 chore(deps): update actions/upload-artifact action to v6 (#2672)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-02 09:35:52 +01:00
Andrey Nering
b7743eda88 chore(goreleaser): update descriptions 2026-01-31 16:20:31 -03:00
Valentin Maerten
c0796e9701 chore: changelog for #2656 2026-01-31 18:53:52 +01:00
Trim21
cf54be3266 fix(node_git): always use unix path style (#2656) 2026-01-31 18:49:22 +01:00
Jens Erat
e129ae2fac docs: fix dir headline level (#2665)
The other commands in this section are on headline level 4, which probably is also the expected one for `dir`.
2026-01-28 18:21:50 +00:00
Andrey Nering
ed69256512 chore: update readme title and description to match website 2026-01-27 22:28:02 -03:00
Andrey Nering
40ad9719d4 chore(website): improve home page title, including on opengraph 2026-01-27 22:18:49 -03:00
Andrey Nering
48f75f0913 docs(cli): mention --list with --silent 2026-01-27 21:53:52 -03:00
Andrey Nering
f000ea2b22 chore(website): have a good opengraph image 2026-01-27 21:53:52 -03:00
Andrey Nering
e8be687a40 chore(website): add "edit this page on github" links 2026-01-27 21:53:52 -03:00
renovate[bot]
788605a3a9 chore(deps): update actions/setup-go action to v6 (#2662)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-26 21:42:04 +01:00
Andrey Nering
697cf442a2 docs(blog): adjust post title 2026-01-26 09:51:43 -03:00
Andrey Nering
e957edf783 chore(website): add goodx sponsor 2026-01-26 09:39:06 -03:00
Andrey Nering
09e7247d05 v3.48.0 2026-01-26 09:26:23 -03:00
Andrey Nering
502f24a2ad docs(changelog): add entry for #2658 and #2660 2026-01-26 09:24:26 -03:00
Valentin Maerten
f09f31c6d5 fix: skip prompting for vars when task if condition fails
Move the prompt for required variables AFTER the if condition check.
This avoids asking the user for input when the task won't run anyway.

The order in RunTask() is now:
1. FastCompiledTask
2. Check required vars early (non-interactive mode only)
3. CompiledTask (resolve dynamic vars)
4. Check if condition → exit early if false
5. Prompt for missing vars (only if task will run)
6. Validate required vars
2026-01-26 09:21:09 -03:00
Valentin Maerten
5a78808caa fix: evaluate task-level if condition after resolving dynamic variables 2026-01-26 09:21:09 -03:00
Valentin Maerten
026c899d90 feat: support self-signed certificates for remote taskfiles (#2537) 2026-01-25 18:51:30 +01:00
Timothy Rule
f6720760b4 fix(includes): propagate silent mode from included Taskfiles to tasks (#2640) 2026-01-25 16:33:52 +01:00
Valentin Maerten
065236f076 chore: changelog for #2635 2026-01-25 16:08:11 +01:00
Timothy Rule
1bd5aa6bd5 fix: correct the value of ROOT_TASKFILE when no entrypoint (#2635) 2026-01-25 16:06:13 +01:00
Valentin Maerten
c3fd3c4b5e chore: add website/.netlify to gitignore 2026-01-25 14:26:53 +01:00
Valentin Maerten
299232ee7d fix(website): improve SEO with favicons, structured data and robots.txt (#2657) 2026-01-25 14:16:23 +01:00
Andrey Nering
12a26fa15e v3.47.0 2026-01-24 20:49:48 -03:00
Andrey Nering
4ab5dec8ae fix(website): have the actual page title on open graph and twitter tags 2026-01-24 20:48:51 -03:00
Andrey Nering
af311229fe docs: new blog post about if: and required variables prompt 2026-01-24 20:48:51 -03:00
Andrey Nering
1443e2d989 chore(deps): update mvdan/sh once again
Closes #2650
2026-01-24 20:48:51 -03:00
Andrey Nering
5bf4e4a29b chore(deps): revert mvdan/sh to latest stable version (#2651)
There is an important regression on interactive commands here. See #2650
and mvdan/sh#1242.

Once mvdan/sh#1244 is merged we'll upgrade again.
2026-01-24 22:21:30 +00:00
Andrey Nering
f9052c9fdf chore(taskfile): add go.mod as a dependency of install 2026-01-24 18:49:38 -03:00
Valentin Maerten
0a82e2e053 chore: changelog for #2579 2026-01-22 21:22:47 +01:00
Valentin Maerten
6dedcafd7d feat(vars): add interactive prompting for required variables (#2579) 2026-01-22 21:20:45 +01:00
Valentin Maerten
c84cfa41f7 chore: changelog for #2564 2026-01-21 23:06:59 +01:00
Valentin Maerten
9bc1efbc47 feat: add conditional execution for tasks and commands (#2564) 2026-01-21 23:05:40 +01:00
Andrey Nering
da7eb0c855 fix(shell): fix deprecation warning 2026-01-21 14:05:52 -03:00
Andrey Nering
edb491a4d0 chore(deps): update shell interpreter
Closes #2446
Ref mvdan/sh#1182
Ref mvdan/sh#1241
2026-01-21 14:05:52 -03:00
renovate[bot]
2ad3d26f4a chore(deps): update all non-major dependencies (#2637)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 21:09:40 +01:00
renovate[bot]
cdfcd08213 chore(deps): update actions/checkout action to v6 (#2638)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 21:08:59 +01:00
Valentin Maerten
382c37bc2a chore: changelog for #2234 2026-01-18 19:07:13 +01:00
Valentin Maerten
618cd8956f feat: wildcard match aliases (#2234) 2026-01-18 19:05:29 +01:00
Andrey Nering
b53e5da41a docs(changelog): add entry for #2584 2026-01-18 09:20:00 -03:00
Timothy Rule
b9c1ab8eae fix: ensure no ansi sequences are printed for --color=false (#2584) 2026-01-18 09:18:52 -03:00
Andrey Nering
e47f55783e docs(changelog): add entry for #1566, #2633 2026-01-18 08:44:50 -03:00
Timothy Rule
d5f071c096 fix: print prefix when task is up-to-date and output-style is prefixed (#2633) 2026-01-18 08:42:18 -03:00
Andrey Nering
fb784f4e3d chore(taskfile): create tag as annotated and add message automatically 2026-01-18 08:35:23 -03:00
renovate[bot]
91f9299c98 chore(deps): update all non-major dependencies (#2611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-14 21:07:58 +01:00
Valentin Maerten
145412a75c chore: changelog for #2602 2026-01-14 19:51:00 +01:00
Valentin Maerten
ba38344ca6 fix: remote git taskfile cloning and directory includes (#2602) 2026-01-14 19:43:39 +01:00
Valentin Maerten
4e963f8714 feat(ci): add on-demand PR build workflow (#2578) 2026-01-14 19:41:50 +01:00
Bouke Versteegh
3d4d189bcd docs: clarify dotenv file precedence when multiple files are specified (#2628) 2026-01-14 19:37:41 +01:00
Andrey Nering
179bde1f37 v3.46.4 2025-12-24 18:57:17 -03:00
Andrey Nering
e4de687aee docs(changelog): add entry for #2592 2025-12-24 18:55:21 -03:00
WinkelCode
06538860a8 fix(completion): use posix whitespace in fish sed regex (#2592) 2025-12-24 18:48:54 -03:00
renovate[bot]
8a37bf5c1f chore(deps): update all non-major dependencies (#2598)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-23 20:36:40 +01:00
Valentin Maerten
ca99266aea feat(schema): add cache-dir property to taskrc schema (#2603) 2025-12-23 20:35:57 +01:00
Andrey Nering
8dfafe507f v3.46.3 2025-12-19 15:50:51 -03:00
Andrey Nering
678fdec7d2 docs(changelog): add entry for #2593 and #2594 2025-12-19 15:50:33 -03:00
Valentin Maerten
3626b271a7 fix(completion): correct zsh pattern matching for global flag (#2594) 2025-12-19 15:48:59 -03:00
Andrey Nering
fc378cfb92 v3.46.2 2025-12-18 17:55:19 -03:00
Andrey Nering
9488a2a744 docs(changelog): add entry for #2588 and #2589 2025-12-18 17:54:38 -03:00
Andrey Nering
6ece2445ae docs(changelog): change tag to match release on github 2025-12-18 17:51:33 -03:00
Valentin Maerten
9b95e758f4 fix: cli variables should take priority over aaskfile defaults (#2589)
When using `task FOO=bar` with a Taskfile containing
`FOO: '{{.FOO | default "foo"}}'`, the CLI value was being
overwritten by the Taskfile default.

Split the variable merging into two steps:
1. Merge CLI variables (FOO=bar) first so they override Taskfile vars
2. ReverseMerge special variables (CLI_ARGS, CLI_FORCE, etc.) so
   they're available for templating in Taskfile vars

Fixes regression introduced in #2403.

Co-authored-by: Timothy Rule <timothy.rule@gmail.com>
2025-12-18 17:50:00 -03:00
Valentin Maerten
28fee2c356 v3.46.1 2025-12-18 17:42:03 +01:00
Valentin Maerten
763e77467b fix: cloudsmith alpine upload 2025-12-18 17:41:54 +01:00
Valentin Maerten
f2385e625d v3.46.0 2025-12-18 17:29:29 +01:00
Valentin Maerten
e929cccd73 docs: better changelog (#2586) 2025-12-18 16:42:55 +01:00
Valentin Maerten
cb183349b7 refactor: migrate from go-git to go-getter (#2512) 2025-12-18 12:21:30 +01:00
Valentin Maerten
2ebbb99f58 improve website's SEO 2025-12-18 08:52:43 +01:00
Valentin Maerten
6660afc8d2 feat: auto-detect color output in CI environments (#2569) 2025-12-18 08:40:37 +01:00
Valentin Maerten
b710259bfa feat(completion): add zstyle verbose option for zsh completion (#2571) 2025-12-18 08:35:56 +01:00
Valentin Maerten
4ec6c453bd feat: add remote.cache-dir taskrc option (#2572) 2025-12-18 08:32:11 +01:00
Valentin Maerten
28408ef3f4 fix(schema): workaround IntelliJ JSON Schema validation bug (#2576) 2025-12-15 23:03:13 +01:00
Valentin Maerten
a2d34ffc4c chore: changelog for #2577 2025-12-15 22:45:52 +01:00
Semih Buyukgungor
1a190a118f feat: expose .CLI_ASSUME_YES templating variable (#2577) 2025-12-15 22:42:27 +01:00
renovate[bot]
18efa3982f chore(deps): update all non-major dependencies (#2580)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 14:33:40 -03:00
Valentin Maerten
655e83454e fix(completion): handle colons in task descriptions for fish (#2573) 2025-12-14 15:56:18 +01:00
Valentin Maerten
3ad4604c36 fix(completion): support --global flag in zsh completion (#2574) 2025-12-14 15:51:15 +01:00
Valentin Maerten
5a27d04655 chore: changelog for #2552 2025-12-12 22:30:18 +01:00
Timothy Rule
ea933bcc55 fix: support error_ignore for a task call (#2552) 2025-12-12 22:28:20 +01:00
Valentin Maerten
e0d6b71971 chore: changelog for #2568 2025-12-12 21:25:59 +01:00
Valentin Maerten
d7ee855e49 feat: emit error annotations in GitHub Actions (#2568) 2025-12-12 21:23:37 +01:00
Valentin Maerten
511f35a456 chore: changelog for #2403 2025-12-12 21:23:17 +01:00
Valentin Maerten
5889ff6b65 fix: globals vars are available in vars at root level (#2403) 2025-12-12 21:20:27 +01:00
Valentin Maerten
85a98b5f90 chore: changelog for #2566 2025-12-12 21:11:30 +01:00
Timothy Rule
89b6140166 fix: always run a watch task regardless of run setting (#2566) 2025-12-12 21:09:35 +01:00
renovate[bot]
8cd51af3b0 chore(deps): update all non-major dependencies (#2540)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-07 21:45:11 +01:00
Valentin Maerten
a40ddd4949 refactor: optimize fuzzy matching with lazy initialization (#2523) 2025-12-07 21:43:26 +01:00
Andrey Nering
b1814277c2 docs(changelog): fix typo 2025-12-07 17:32:31 -03:00
Andrey Nering
500ab8b941 docs(changelog): add entry for #2433 2025-12-07 17:31:25 -03:00
Andrey Nering
745633dc0e fix: a couple of fixes and improvements on task --init (#2433)
* Fixed check for an existing Taskfile: look for all possibilities, and
  not only `Taskfile.yml` specifically.
* Added a description (`desc`) to the `default` task. Important to at
  least `task --list` work by default (a core feature).
* Changed top comment to YAML language server comment.
2025-12-07 20:29:51 +00:00
Andrey Nering
9b99866224 feat: add --failfast and failtest: true to control dependencies (#2525) 2025-12-07 17:23:08 -03:00
Valentin Maerten
54e4905432 ci(renovate): track golangci-lint version in workflows (#2557) 2025-12-07 12:53:56 +01:00
Valentin Maerten
c95805e0e0 build(deps): update crypto dependencies (#2555) 2025-12-07 12:44:05 +01:00
Valentin Maerten
4560589652 ci(lint): update golangci-lint-action to v2.7.1 (#2556) 2025-12-07 12:41:44 +01:00
renovate[bot]
084d6444b4 chore(deps): update actions/setup-node action to v6 (#2553)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-07 12:28:50 +01:00
Valentin Maerten
3fb7919577 build(deps): upgrade xsync from v3 to v4 (#2554) 2025-12-07 12:28:31 +01:00
Valentin Maerten
69b345efc9 chore: changelog for #2495 2025-12-07 12:21:30 +01:00
Valentin Maerten
4af5278d73 fix: autocomplete works with other binary than 'task' (#2495) 2025-12-07 12:20:45 +01:00
Valentin Maerten
12fbdd3ec7 chore: changelog for #2491 2025-12-07 12:19:02 +01:00
Maciej Lech
72a349b0e9 feat: add --trusted-hosts CLI and remote.trusted-hosts config for remote tasks (#2491)
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2025-12-07 12:17:54 +01:00
Valentin Maerten
896d65b21f ci(release): switch to npm trusted publishers with OIDC (#2550) 2025-12-07 09:55:18 +01:00
Valentin Maerten
2161f33b5c chore: changelog for #2536 2025-12-02 20:38:02 +01:00
Valentin Maerten
b93638b97a fix: allow application/octet-stream for a Remote taskfile (#2536) 2025-12-02 20:36:35 +01:00
Valentin Maerten
47b78ca879 chore: changelog for #1844 2025-11-30 10:57:40 +01:00
boiledfroginthewell
f0b15d397b fix: CLI_ARGS completion for fish and zsh (#1844) 2025-11-30 10:55:36 +01:00
Valentin Maerten
eb285fa3d2 chore: changelog for #2513 2025-11-29 12:41:56 +01:00
Valentin Maerten
02b13a687a feat(website): add llms.txt for AI agents (#2513) 2025-11-29 12:40:44 +01:00
Valentin Maerten
a085d62727 feat(completion): add missing flags and dynamic experimental feature detection (#2532) 2025-11-29 12:16:58 +01:00
Valentin Maerten
4ab1958df1 feat(summary): add vars, env, and requires display (#2524) 2025-11-29 11:14:20 +01:00
Valentin Maerten
54ca217b92 fix(release): wrap changelog with v-pre directive (#2526) 2025-11-29 11:05:37 +01:00
renovate[bot]
a6c0c1daba chore(deps): update all non-major dependencies (#2515)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 16:31:43 -03:00
renovate[bot]
9cc1c7b40b chore(deps): update actions/checkout action to v6 (#2527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-26 13:59:45 -03:00
Andrey Nering
7901cce831 chore: run gofumpt 2025-11-22 18:09:50 -03:00
Andrey Nering
c7b4f26900 chore: run modernize 2025-11-22 17:30:30 -03:00
Andrey Nering
3ed403b839 chore(changelog): add entry for #2511 2025-11-22 17:20:46 -03:00
Timothy Rule
386dcbc1a0 fix: adjust run: when_changed to work correctly with imported tasks (#2511) 2025-11-22 17:17:13 -03:00
Andrey Nering
799bc85498 docs(readme): update links 2025-11-19 10:02:58 -03:00
Daniel Thorngren
0d9e8dd71b docs: corrected substr templating example (#2519) 2025-11-18 18:03:48 +00:00
Samuel Krieg
a927ffb31e docs: add tasks.task.dir (#2489) 2025-11-15 17:53:10 +01:00
renovate[bot]
42ad618205 chore(deps): update golangci/golangci-lint-action action to v9 (#2502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-15 17:51:13 +01:00
Andrey Nering
2b713f564f chore(goreleaser): remove / from branch name
As an attempt to fix the 404 error for `winget`.
2025-11-13 10:40:57 -03:00
Andrey Nering
cb8e94aa33 ci(goreleaser): add /cc to maintainers on winget pr 2025-11-12 09:12:13 -03:00
Andrey Nering
6bc339d714 chore: go mod tidy 2025-11-12 09:12:13 -03:00
Valentin Maerten
5712c463f5 chore: changelog for #2507 2025-11-12 10:27:33 +01:00
Valentin Maerten
78cc6e5fd3 fix: RPM upload for Cloudsmith (#2507) 2025-11-12 10:15:56 +01:00
Valentin Maerten
38e07ea812 fix: changelog for website 2025-11-11 21:54:51 +01:00
Andrey Nering
72e25a25fd v3.45.5 2025-11-11 17:13:39 -03:00
renovate[bot]
a496ee5fcb chore(deps): update all non-major dependencies (#2501)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-11 20:12:27 +00:00
Andrey Nering
ef4292c42f chore(changelog): add entry for #2506 2025-11-11 17:09:17 -03:00
Andrey Nering
dc315efc7f chore(deps): update mvdan.cc/sh/moreinterp with core utils fixes
* Fixes https://github.com/go-task/task/issues/2426
* Ref https://github.com/u-root/u-root/pull/3464
* Ref https://github.com/mvdan/sh/pull/1199
2025-11-11 17:09:17 -03:00
Andrey Nering
a3a3e7fb0b chore(changelog): add entry for #2434 2025-11-11 16:51:53 -03:00
Andrey Nering
ee99849b1d refactor: migrate to the official yaml package (#2434)
The old package is long archived, but the YAML org forked it and will
officially maintain it from now on.

* Old: https://github.com/go-yaml/yaml
* New: https://github.com/yaml/go-yaml
2025-11-11 19:49:37 +00:00
Andrey Nering
bf9dc3f662 chore(changelog): add entry for #2286 2025-11-11 16:43:15 -03:00
Graham Dennis
94f82cbc5a fix: make task failure errors include stack of running tasks (#2286)
Previously if a task was run as a dependency of another task,
the error message simply reported something like:

    exit status 1

It is desirable instead to name the root task and all child tasks in the tree
to the failing task.

After this PR, the error message will read:

    task: Failed to run task "root": task: Failed to run task "failing-task": exit status 1
2025-11-11 16:40:40 -03:00
Valentin Maerten
b14318ed3f chore: changelog for #2494 2025-11-11 20:40:32 +01:00
Valentin Maerten
17757c0c15 fix: better error when a Taskfile does not exist in include (#2494) 2025-11-11 20:37:24 +01:00
Andrey Nering
19f72b7eb0 chore(changelog): add entry for #2418 2025-11-11 15:51:33 -03:00
Timothy Rule
0052ad2309 fix: do not re-evaluate variables for defer: (#2418) 2025-11-11 15:50:01 -03:00
Andrey Nering
af1e755196 chore(changelog): add entry for #2350 2025-11-11 14:42:18 -03:00
Andrey Nering
43074c20f2 refactor: improve code of group output 2025-11-11 14:37:16 -03:00
Timothy Rule
39c86992bd fix: address concurrent group output causing flaky tests (#2350) 2025-11-11 14:36:32 -03:00
Kaj Kowalski
c71241bcbd docs: fix YAML syntax errors in schema and guide documentation (#2500) 2025-11-10 11:00:39 +01:00
renovate[bot]
7c2bb78540 chore(deps): update all non-major dependencies (#2492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 21:21:21 -03:00
Andrey Nering
32e675895a chore(website): update umami domain 2025-11-07 17:48:28 -03:00
Tatsuya Kyushima
786813d95d docs: add fzf-make to "community integrations" (#2393) 2025-11-04 14:32:53 -03:00
Valentin Maerten
f7287c503a docs: dictionary operations example was wrong (#2490) 2025-11-02 19:17:13 +01:00
Valentin Maerten
413574e3ee chore: changelog for #1322, #2053 2025-11-02 17:25:35 +01:00
Valentin Maerten
4b39becf65 chore: changelog for #2460, #2461 2025-11-02 17:25:35 +01:00
Valentin Maerten
15b7e3c69a refactor: VeryFastCompile for Task list (#2053) 2025-11-02 17:25:07 +01:00
Libor Mořkovský
7c93ea8b44 docs: add reference to slim-sprig in the templating page (#2472) 2025-11-02 17:21:17 +01:00
Valentin Maerten
6a7cfa58f9 fix: return taskrc config even if there is an error (#2461) 2025-11-02 17:15:58 +01:00
renovate[bot]
74b93f6eef chore(deps): update all non-major dependencies (#2463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-02 17:03:54 +01:00
Andrey Nering
88101613c8 docs: add magic.dev as a gold sponsor 2025-10-17 09:56:59 -03:00
Valentin Maerten
599591ad3c chore: changelog for #2437, #2438 2025-10-12 13:30:28 +02:00
Skip Baney
348158a5f6 fix: properly resolve remote entrypoints (#2438) 2025-10-12 13:29:57 +02:00
pancho horrillo
c3e410e95a docs: update Arch and Nix community links (#2454) 2025-10-10 22:33:52 +02:00
Aku Kotkavuo
42bcd5406a docs: link to the known bug with --watch (#2449) 2025-10-10 22:26:40 +02:00
renovate[bot]
ba23aca631 chore(deps): update module github.com/puzpuzpuz/xsync/v3 to v4 (#2168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 22:22:16 +02:00
renovate[bot]
5ef245a4bd chore(deps): update all non-major dependencies (#2448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 22:12:37 +02:00
renovate[bot]
036a60f517 chore(deps): update actions/github-script action to v8 (#2421)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 21:55:30 +02:00
renovate[bot]
9c969541a5 chore(deps): update actions/setup-python action to v6 (#2457)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 21:35:21 +02:00
renovate[bot]
a52b483dd0 chore(deps): update actions/setup-go action to v6 (#2456)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 21:32:17 +02:00
Pete Davison
4e84c6bb76 fix: links to static files 2025-09-23 22:34:43 +00:00
merusso
0f9baf62a1 docs: Update Remote Taskfiles default values (#2430)
* docs: Update Remote Taskfiles default values

This change updates the documentation for [Remote Taskfiles > Configuration](https://taskfile.dev/docs/experiments/remote-taskfiles#configuration) for `timeout` and `cache-expiry` to match the defaults in code.

* docs: Update `cache-expiry` default to 0s

* docs: Update executor.go comment

Fix doc comment to indicate that cache expiry default duration is 0.
2025-09-23 13:10:20 +01:00
renovate[bot]
979ad523ef chore(deps): update mvdan.cc/sh/moreinterp digest to 1714925 (#2435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 09:30:52 -03:00
renovate[bot]
975c07688e chore(deps): update all non-major dependencies (#2436)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 09:30:29 -03:00
Andrey Nering
67a02255b5 docs(changelog): add entry for #2431 2025-09-21 16:12:06 -03:00
Andrey Nering
028ae1a660 fix: fix message shown when a taskfile was not found (#2431) 2025-09-21 16:10:06 -03:00
Andrey Nering
68b1d2783d lint: fix lint by passing context 2025-09-21 16:09:51 -03:00
Andrey Nering
12793c350d chore: delete unused file cmd/tmp/main.go 2025-09-21 16:09:51 -03:00
Andrey Nering
8716ab81be docs: remove ga 2025-09-17 18:39:09 -03:00
Andrey Nering
c2a4e4470b docs: update sprig links to our domain 2025-09-17 18:32:49 -03:00
Valentin Maerten
f5a8ec8a0c fix: changelog in website 2025-09-17 17:12:57 +02:00
Valentin Maerten
048d92709a v3.45.4 2025-09-17 17:05:20 +02:00
Valentin Maerten
8dc9637e7a chore: changelog for #2413, #2424, #2425 2025-09-16 19:36:19 +02:00
Valentin Maerten
700bf00107 fix: search for all taskrc work as expected (#2424) 2025-09-16 19:35:31 +02:00
Valentin Maerten
4836d42828 fix: cache expiry in Taskrc was not working (#2423) 2025-09-16 19:35:12 +02:00
Valentin Maerten
5762d5ef8e fix: autocomplete from subfolder works as expected in zsh shell (#2425) 2025-09-16 19:34:57 +02:00
Andrey Nering
9f2fe0da61 docs: github action is not community maintained anymore 2025-09-16 14:01:33 -03:00
renovate[bot]
d1a5771839 chore(deps): update all non-major dependencies (#2420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-16 14:19:35 +00:00
renovate[bot]
7663abdcde chore(deps): update mvdan.cc/sh/moreinterp digest to b717ad5 (#2409)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-16 11:14:12 -03:00
Valentin Maerten
1e42e1f817 fix: changelog for website 2025-09-16 08:54:06 +02:00
Valentin Maerten
5f7ae5d32e fix: changelog for website 2025-09-16 08:39:03 +02:00
Pete Davison
17db402e4b v3.45.3 2025-09-15 12:59:29 +00:00
Valentin Maerten
f2242958a6 fix: pnpm install in the website's folder 2025-09-15 14:55:55 +02:00
Pete Davison
ea4b695b5a chore: move changelog items back to unreleased 2025-09-15 12:45:35 +00:00
Pete Davison
209c88c341 v3.45.2 2025-09-15 12:40:54 +00:00
Pete Davison
bd94f9f607 fix: set pnpm version 2025-09-15 12:40:12 +00:00
Pete Davison
9f6b78ec84 chore: move changelog items back to unreleased 2025-09-15 12:38:52 +00:00
Pete Davison
fbde227167 v3.45.1 2025-09-15 12:34:34 +00:00
Pete Davison
fc06e92a87 chore: move changelog items back to unreleased 2025-09-15 12:34:11 +00:00
Pete Davison
a0cab3f5ec fix: use go-task/setup-task instead of arduino/setup-task in CI 2025-09-15 12:30:35 +00:00
Pete Davison
bb4c254211 v3.45.0 2025-09-15 12:17:50 +00:00
Pete Davison
57bf348829 fix: release script 2025-09-15 12:17:28 +00:00
Pete Davison
092b9b6391 chore: update blog post date 2025-09-15 12:16:51 +00:00
Andrey Nering
cd8c831204 chore(website): add umami 2025-09-14 10:18:32 -03:00
Andrey Nering
0d03f4f266 docs(changelog): add entry for #2416 and #2417 2025-09-12 15:46:42 -03:00
Timothy Rule
b8bf298c84 fix: panic for empty hash var ({}) (#2417) 2025-09-12 15:29:40 -03:00
Pete Davison
9a91c4cb21 chore: changelog for the new github action 2025-09-12 14:22:55 +00:00
Pete Davison
2921450bf7 docs: add mise and github actions installation methods (#2414)
* docs: add mise and github actions installation methods

* chore: rename go-task/action to go-task/setup-task
2025-09-11 18:48:23 +01:00
Valentin Maerten
dffa355cad chore: changelog for #1808 2025-09-11 19:47:06 +02:00
Valentin Maerten
48039be12c feat: improve fingerprint, run and output with wildcard (#1808) 2025-09-11 19:33:53 +02:00
Andrey Nering
43cb64e6cc fix: address panic if a config file is not available 2025-09-11 10:02:51 -03:00
Pete Davison
25a7b5936f chore: changelog for #2415 2025-09-11 09:30:02 +00:00
Pete Davison
4ae3071845 feat: nested json (#2415)
* feat: nested json

* feat: remove up_to_date from json output when --no-status flag is set

* feat: restrict use of --nested with --json and --list/--list-all
2025-09-11 10:26:59 +01:00
Valentin Maerten
242523c797 chore: changelog for #2380, #1403 2025-09-10 17:58:33 +02:00
Valentin Maerten
0fdb5e8665 feat: add some config to taskrc.yml (#2389)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2025-09-10 17:57:52 +02:00
renovate[bot]
534dfa089c chore(deps): update all non-major dependencies (#2410) 2025-09-08 10:11:02 -03:00
Valentin Maerten
51a3bcaacd fix: cloudsmith and add docs (#2383) 2025-09-03 19:59:06 +02:00
Andrey Nering
6289fcf34c chore: simplify blog post title 2025-08-29 17:49:40 -03:00
Andrey Nering
2959737d7d chore(changelog): fix typo 2025-08-27 11:39:45 -03:00
Andrey Nering
a3047d3cd8 chore(changelog): add entries for #197 and #2360 2025-08-27 11:37:45 -03:00
Andrey Nering
725600f220 docs: add blog post about the built-in core utilities 2025-08-27 11:29:38 -03:00
Andrey Nering
fd83414074 docs: update docs and faq to mention the new core utils 2025-08-27 11:29:38 -03:00
Andrey Nering
6c645a33f7 feat: add native core utils to improve compatibility on windows 2025-08-27 11:29:38 -03:00
Andrey Nering
9d969e5971 fix(website): remove og:* and twitter:* meta tags for now
Since we're not putting the right page title and description, it's not
really working as expected. It is currently generating the same title
and description for all pages. Removing makes socials at least use the
main `<title>` tag, which will be accurate.
2025-08-26 22:52:23 -03:00
Andrey Nering
8b382a3bae chore(website): taskfile -> task and change emoji 2025-08-26 22:24:21 -03:00
Andrey Nering
a34892ad94 chore: go mod tidy 2025-08-26 20:51:11 -03:00
renovate[bot]
e55bb29554 chore(deps): update all non-major dependencies (#2398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 10:16:56 -03:00
renovate[bot]
1168ef32df chore(deps): update pnpm to v10 (#2399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 10:04:45 -03:00
Valentin Maerten
245d7f747f chore: use gotestsum for test (#2381) 2025-08-24 18:47:41 +02:00
Ioannis Pinakoulakis
b216ae885c perf: pre-allocate known length arrays (#2354)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2025-08-23 15:41:30 +01:00
Tatsuya Kyushima
61cb15ad01 chore: delete unnecessary whitespace (#2394) 2025-08-23 15:37:06 +01:00
Pete Davison
04579c0c44 chore: changelog for #2391 2025-08-20 11:22:11 +00:00
Pete Davison
39462cbfde feat: change XDG taskrc naming (#2391) 2025-08-20 12:13:26 +01:00
Valentin Maerten
72dfec68b0 chore: changelog for #2380 2025-08-18 22:50:09 +02:00
Pete Davison
f89c12ddf0 feat: XDG taskrc config (#2380)
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2025-08-18 22:43:36 +02:00
renovate[bot]
c903d07332 chore(deps): update all non-major dependencies (#2386)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 13:45:13 -03:00
renovate[bot]
138b9a5a4f chore(deps): update actions/checkout action to v5 (#2387)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 18:45:04 +02:00
Valentin Maerten
1e2121a99f chore: changelog for #2235 2025-08-16 13:09:30 +02:00
Valentin Maerten
9495fb2b1c feat: add experiments to taskrc.yml schema (#2235) 2025-08-16 10:54:47 +02:00
Pete Davison
1fda55910e chore: changelog for #2359, #2369, #2371, #2375, #2378, #2358 and #2358 2025-08-15 08:46:16 +00:00
Andrey Nering
e6c808c02b chore(readme): github doesn't like svg images 2025-08-14 13:35:43 -03:00
Valentin Maerten
0fc26a43a9 chore: bump minimun version to 1.24 (#2377) 2025-08-14 18:34:38 +02:00
Andrey Nering
c0b4c19443 chore(readme): fix images 2025-08-14 13:29:40 -03:00
Pete Davison
1a8df44e9e fix: readd environment reference (#2378) 2025-08-14 17:22:04 +01:00
Valentin Maerten
82ad1de8d0 docs: remove wrong <span v-pre> (#2375) 2025-08-14 10:39:46 +02:00
Valentin Maerten
d59c795502 fix: goreleaser with cloudsmith and npm (#2372) 2025-08-13 15:14:57 +02:00
Andrey Nering
504cb94e8b chore(website): add back google analytics 2025-08-12 17:58:44 -03:00
Valentin Maerten
e7606635fe docs: remove padding in team page and fix redirect (#2371) 2025-08-12 21:59:07 +02:00
Valentin Maerten
9a05ceaa80 docs: use Algolia as search engine (#2369) 2025-08-12 18:52:47 +02:00
Valentin Maerten
083654d8c9 build: publish npm package with goreleaser (#2363) 2025-08-12 18:51:20 +02:00
Valentin Maerten
79c93fb42b docs: migrate website to vitepress (#2359)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
2025-08-12 18:09:19 +02:00
Valentin Maerten
64fc538a16 build: publish deb and rpm to cloudsmith (#2362) 2025-08-12 15:40:13 +02:00
renovate[bot]
4da081e5c3 chore(deps): update all non-major dependencies (#2364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 09:35:21 -03:00
Valentin Maerten
4bdfe5ce3b fix: publish nightly draft and title (#2358) 2025-08-09 16:03:46 +02:00
Valentin Maerten
26ef693417 chore: publish nightly (#2246)
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
2025-08-06 20:29:36 +02:00
renovate[bot]
952f32d388 chore(deps): update all non-major dependencies (#2351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-06 10:51:19 -03:00
Andrey Nering
e72c35f79f fix(goreleaser): fix automatic submission of winget pr 2025-07-28 10:59:45 -03:00
Pete Davison
72991d4f04 v3.44.1 2025-07-23 20:59:38 +00:00
Pete Davison
6f965e3043 chore: changelog for #2265 2025-07-23 20:59:14 +00:00
Pete Davison
1c6d686356 chore: replace PPRemoveAbsolutePaths with generic fixture template data (#2265)
* chore: replace PPRemoveAbsolutePaths with generic fixture template data

* chore: update to goldie v2.7.1
2025-07-23 21:57:25 +01:00
renovate[bot]
dac5aa1954 chore(deps): update all non-major dependencies (#2333)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 09:46:14 -03:00
Emil
303bd6ccb2 chore(goreleaser): add section field to deb package (#2331) 2025-07-21 09:45:08 -03:00
renovate[bot]
f736cfaaf1 chore(deps): update all non-major dependencies (#2326)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 09:23:53 -03:00
Pete Davison
53f97889bc chore: changelog for #2323 2025-07-09 17:38:54 +00:00
Max Mizikar
fe2da74ea3 fix: don't suggest internal tasks (#2323)
Co-authored-by: Max Mizikar <maxmzkr@gmail.com>
2025-07-09 18:36:40 +01:00
Pete Davison
64fb66895b chore: added changelogs for #2316 and #2322 2025-07-09 15:26:47 +00:00
Pete Davison
d2bd834c81 fix: spaces in path (#2322) 2025-07-09 16:21:42 +01:00
Andrey Nering
8a43ca5d8f chore: move away from deprecated func 2025-07-07 10:14:50 -03:00
Andrey Nering
a10a9faabf chore(taskfile): add go.mod as source for the lint tasks 2025-07-07 10:14:50 -03:00
renovate[bot]
3d3ed0e403 chore(deps): update all non-major dependencies 2025-07-07 10:14:50 -03:00
Pete Davison
47dc87a2c9 fix: remove extra breaking randInt function (#2316) 2025-07-03 23:08:43 +01:00
Pete Davison
3b0a746f85 feat: update go-task/template to latest version 2025-07-03 21:46:09 +00:00
renovate[bot]
281edfe5b3 chore(deps): update all non-major dependencies (#2311)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 09:32:44 -03:00
Alexander Kavon
7289ffce0b docs: add macports / freebsd installation instructions (#2308) 2025-06-30 09:31:48 -03:00
dependabot[bot]
61e1af50ff chore(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /website (#2298)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 10:39:42 -03:00
renovate[bot]
715a143735 chore(deps): update all non-major dependencies (#2297)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 09:26:27 -03:00
Andrey Nering
a0b1605634 chore: add changelog entry for #2291 2025-06-09 14:12:03 -03:00
Timothy Rule
69fc13bd13 fix(release): fix install script for armv5/6/7 (#2291) 2025-06-09 14:07:11 -03:00
renovate[bot]
b42a52ba77 chore(deps): update all non-major dependencies (#2289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-08 22:09:51 -03:00
Andrey Nering
cb812476b3 v3.44.0 2025-06-08 21:34:13 -03:00
Andrey Nering
b09c6870fe docs: add note about watcher reliability 2025-06-08 21:31:47 -03:00
Andrey Nering
86e4a3aac7 chore(changelog): add entried for watch fixes 2025-06-08 21:19:03 -03:00
Andrey Nering
7782bc92ae fix(watcher): fix some v3.43.x regressions (#2271) 2025-06-08 19:44:08 -03:00
renovate[bot]
9cc2d65091 chore(deps): update all non-major dependencies (#2281) 2025-06-02 13:26:32 +00:00
Andrey Nering
b932e539d9 chore: go mod tidy 2025-05-28 22:08:27 -03:00
Teddy Sommavilla
be45eb04d9 refactor: watchTasks - Chmod operations are already filtered in the Deduper 2025-05-26 16:51:37 -03:00
Teddy Sommavilla
6b878980dc refactor(fsnotifyext): use Event.Has to check for chmod operations
As recommended by the Event.Op godoc. Op is a bitmask, and some systems may send multiple operations at once
2025-05-26 16:51:37 -03:00
Teddy Sommavilla
cd910abd45 doc(fsnotifyext): add godoc for GetChan method 2025-05-26 16:51:37 -03:00
Teddy Sommavilla
6e524bb2fa refactor(fsnotifyext): GetChan should return a receive only chan 2025-05-26 16:51:37 -03:00
Teddy Sommavilla
b4c8f5a0fe refactor(fsnotifyext): handle Deduper timers in own goroutine, avoid mutex use 2025-05-26 16:51:37 -03:00
renovate[bot]
09f85844ba chore(deps): update all non-major dependencies (#2270) 2025-05-26 16:39:01 -03:00
Pete Davison
d54d2ccabc chore: add special variables task to remote for testing 2025-05-24 13:33:55 +00:00
Pete Davison
cf81ab3112 chore: go mod tidy 2025-05-24 13:11:02 +00:00
Pete Davison
aaa7b7772d chore: changelog for #2223 2025-05-24 13:03:29 +00:00
Pete Davison
71eb8cdeea feat: checksum pinning (#2223) 2025-05-24 14:00:02 +01:00
Pete Davison
68ce8b1d84 chore: changelog for #2220 2025-05-24 12:41:31 +00:00
Pete Davison
5323990c72 feat: redact credentials in remote urls (#2220)
* feat: redact credentials in remote urls

* chore: improve function naming

* fix: TaskfileNotSecureError should use redacted URI

* feat: unexport all node implementation fields

* fix: unexport HTTPNode.url
2025-05-24 13:38:18 +01:00
Pete Davison
ec4e68d601 chore: changelog for #2256 2025-05-20 20:40:28 +00:00
Aleksander Sh.
bb5b045293 feat: add task name to json output (#2256) 2025-05-20 21:37:57 +01:00
renovate[bot]
89f29cb75b chore(deps): update all non-major dependencies (#2260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 13:38:05 +02:00
Andrey Nering
da4ce5b0a5 fix(expand): return nothing if there are no matches 2025-05-09 15:55:52 -03:00
renovate[bot]
fb68a5f79a chore(deps): update golangci/golangci-lint-action action to v8 (#2237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2025-05-06 20:45:06 +02:00
renovate[bot]
f40f389cb4 chore(deps): update all non-major dependencies (#2236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 20:43:16 +02:00
Valentin Maerten
a459eeaabb chore: changelog for #2233 2025-05-03 17:18:27 +02:00
Valentin Maerten
84f02a822f docs: mention that method key is allowed at root level (#2233) 2025-05-03 17:17:11 +02:00
Valentin Maerten
55d1aa260d chore: changelog for #2211 2025-05-03 17:12:31 +02:00
Valentin Maerten
e7084cdf26 chore: update schemas only when a release is done (#2211) 2025-05-03 17:11:56 +02:00
Pete Davison
ca55e9b621 chore: changelog for #2225 2025-05-01 17:58:47 +00:00
Pete Davison
6528b36caa feat: add uuid and rand number functions (#2225)
* feat: add uuid and rand number functions

* chore: remove randFloat for now
2025-05-01 17:58:01 +00:00
Pete Davison
f8736c5f77 chore: changelog for #2140 2025-05-01 17:51:47 +00:00
Pete Davison
6896accf86 feat: cli args list (#2140) 2025-05-01 18:43:43 +01:00
Pete Davison
c12ed49acb chore: remove unused any2 testdata 2025-04-28 21:04:24 +00:00
Pete Davison
d1bfd3e9f7 docs: move yaml templating functions to the correct section 2025-04-28 20:57:18 +00:00
renovate[bot]
fc17343fcc chore(deps): update all non-major dependencies (#2214)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 14:37:44 +02:00
Pete Davison
d3e9be1520 chore: changelog for #2219 2025-04-28 12:21:26 +00:00
Pete Davison
d850d03c96 feat: add yaml templating functions (#2219)
* feat: add yaml templating functions

* docs: add yaml functions to templating reference

* refactor: remove some unnecessary function wrappers
2025-04-28 12:19:56 +00:00
Pete Davison
0058f18676 chore: changelog for #2216 2025-04-28 12:05:10 +00:00
Pete Davison
b3c4007756 fix: double escaped paths (#2216) 2025-04-28 13:02:46 +01:00
Pete Davison
9e8fd54be9 chore: changelog for #2200 2025-04-27 23:02:32 +00:00
Valentin Maerten
a33544101a fix: fuzzy model was not instanciated (#2200)
* fix: fuzzy model was not instanciated

* add test

* add test
2025-04-28 00:00:54 +01:00
Pete Davison
1c35358fcc v3.43.3 2025-04-27 22:29:34 +00:00
Pete Davison
13daa6dc35 feat: formatting with golangci-lint and gci 2025-04-27 22:28:42 +00:00
Pete Davison
20c1ffe098 docs: update variables example so that it doesn't error 2025-04-27 22:26:59 +00:00
Pete Davison
bd8ccb8d03 chore: changelogs for reverts 2025-04-27 22:26:29 +00:00
Pete Davison
8162b05f59 Revert "feat: process variables in include vars (#2113)"
This reverts commit f0414f162d.
2025-04-27 22:15:49 +00:00
Pete Davison
68d5095761 Revert "fix: .USER_WORKING_DIR should contain the value of --dir if given (#2186)"
This reverts commit 768dca053b.
2025-04-27 22:14:50 +00:00
Andrey Nering
6cb0a5a2f2 v3.43.2 2025-04-21 16:35:01 -03:00
Andrey Nering
08056924e0 chore: add changelog entry for #2191 2025-04-21 16:33:30 -03:00
Valentin Maerten
39706105e1 fix: CLI_ARGS is a string and not an array (#2191) 2025-04-21 16:31:18 -03:00
Andrey Nering
bf4e7960cb chore: show right version on changelog 2025-04-21 14:31:25 -03:00
Andrey Nering
3d36616e9e v3.43.1 2025-04-21 13:57:43 -03:00
Andrey Nering
3976e8372a chore: move the experiments package out of the internal/ dir
Closes #2014
2025-04-21 13:55:56 -03:00
Andrey Nering
c2123dc016 v3.43.0 2025-04-21 13:50:40 -03:00
Andrey Nering
0a6cd1ee42 chore: add changelog entry for #2173 2025-04-21 13:48:25 -03:00
Valentin Maerten
7169bf6434 fix: interpolate vars in defer (#2173) 2025-04-21 13:43:20 -03:00
renovate[bot]
84cd4dfdad chore(deps): update all non-major dependencies (#2188)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 13:52:23 +02:00
Pete Davison
672b39413f feat: mockery v3 (#2110) 2025-04-19 12:55:22 +01:00
Pete Davison
7eebf6e704 chore: delete unused exp package 2025-04-19 11:54:48 +00:00
Pete Davison
4834ac743c chore: changelog for #2166 2025-04-19 11:54:27 +00:00
Pete Davison
c5afffb551 feat: recursive config search (#2166)
* refactor: experiments flags

* refactor: args.Parse

* feat: recursive search for taskrc files

* feat: consolidate some code into new fsext package

* feat: add tests for search and default dir

* fix: linting issues
2025-04-19 12:20:33 +01:00
Pete Davison
1ae3bf0b25 chore: changelog for #2176 2025-04-19 11:20:17 +00:00
Pete Davison
a84f09d45f feat: remote taskfile improvements (cache/expiry) (#2176)
* feat: cache as node, RemoteNode and cache-first approach

* feat: cache expiry

* feat: pass ctx into reader methods instead of timeout

* docs: updated remote taskfiles experiment doc

* feat: use cache if download fails
2025-04-19 12:12:08 +01:00
Pete Davison
f47f237093 chore: changelog for #2169 2025-04-19 11:11:51 +00:00
Pete Davison
04df108fb5 docs: package api docs (#2169)
* refactor: pass Node into Read method instead of Reader type

* docs: add "key packages" and "Reading Taskfiles" sections to package doc
2025-04-19 11:58:31 +01:00
Pete Davison
8885d9e4f7 chore: changelog for #2075 2025-04-19 10:57:36 +00:00
Pete Davison
a60c2ec3f8 fix: sources brace expansion (#2075) 2025-04-19 11:51:31 +01:00
Andrey Nering
f789c57624 chore: add changelog entry for #2134 2025-04-18 22:56:46 -03:00
atusy
7416b7d77e feat(completion): let fish complete global tasks if --global (-g) is passed (#2134) 2025-04-18 22:55:53 -03:00
Andrey Nering
c1ab661cf2 chore: add changelog entry for #2102, #2103 and #2186 2025-04-18 22:32:19 -03:00
Andrey Nering
768dca053b fix: .USER_WORKING_DIR should contain the value of --dir if given (#2186)
Closes #2102
Closes #2103

Co-authored-by: jaynis <kranz.jannis@googlemail.com>
2025-04-18 22:27:30 -03:00
Jay Berkenbilt
e65159f613 docs: clarify --dir flag (#2123)
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
2025-04-17 23:10:57 +00:00
Pete Davison
789a7ea950 docs: things aren't always simple 2025-04-16 15:59:35 +00:00
renovate[bot]
b11da93c78 chore(deps): update dependency @types/react to v19.1.1 (#2178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-14 10:38:04 -03:00
renovate[bot]
8c720b03aa chore(deps): update all non-major dependencies (#2167)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-11 10:29:35 -03:00
Pete Davison
8c8b1b5f3b fix: make version semver compliant 2025-04-11 09:04:03 +00:00
Pete Davison
38b42d0fb1 fix: experiments validation should happen before command flags are evaluated 2025-04-10 08:45:55 +00:00
Pete Davison
669bf33619 chore: changelog for #2151 2025-04-05 23:15:02 +00:00
Artem Sedykh
6f0f38b8d9 feat: support for loops with generates (#2151) 2025-04-05 23:55:43 +01:00
Pete Davison
a9de239e38 chore: changelog for #2113 2025-04-05 22:16:30 +00:00
Pete Davison
f0414f162d feat: process variables in include vars (#2113)
* feat: process variables in include vars

* feat: add test for include variables
2025-04-05 23:12:54 +01:00
Pete Davison
a24f4958cd chore: changelog for #2131 2025-04-05 22:12:18 +00:00
Pete Davison
55790be6ad feat: better versioning (#2131) 2025-04-05 23:09:27 +01:00
Andrey Nering
88fdbd13cf ci: use goreleaser pro
Thanks @caarlos0 for the free key!
2025-04-05 18:20:32 -03:00
Pete Davison
566ac29932 feat: update golangci-lint version in ci 2025-04-05 17:58:50 -03:00
Pete Davison
ffef3ed1a6 feat: migrate to golangci-lint v2 2025-04-05 17:58:50 -03:00
Andrey Nering
2a60842707 chore: remove some repo files that were moved to the .github repo
https://github.com/go-task/.github
2025-04-05 17:51:56 -03:00
renovate[bot]
41bd866813 chore(deps): update all non-major dependencies (#2165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-05 21:39:07 +02:00
Iain Majer
01bc0a0529 docs: specify that install command parameters are order specific (#2115)
Co-authored-by: Iain Majer <iain.majer@river-island.com>
2025-04-05 21:28:36 +02:00
Valentin Maerten
a6a9792b7e docs: use .taskrc instead of .task-experiments.yml in our docs (#2157)
* docs: use .taskrc instead of .task-experiments.yml in our docs

* fix formatting

* fix: whitespace in experiments.mdx

---------

Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2025-04-03 13:29:00 +02:00
dependabot[bot]
ce032dc46b chore(deps): bump image-size from 1.2.0 to 1.2.1 in /website (#2152) 2025-04-02 12:55:15 -03:00
Pete Davison
f07f4c85b2 chore: changelog for #2148 2025-04-01 13:56:41 +00:00
Pete Davison
cd81d94e18 feat: better functional options for reader (#2148) 2025-04-01 14:51:25 +01:00
Pete Davison
1939f83ffe chore: changelog for #2147 2025-03-31 20:50:14 +00:00
Pete Davison
2a92b70bc2 feat: better functional options (#2147) 2025-03-31 21:49:00 +01:00
Pete Davison
4736bc2734 refactor: unify how executor tests are written (#2042)
* feat: use TaskTest for executor tests

* feat: more tests

* feat: separate tests for executing and formatting with new functional options that work for both test types

* feat: formatter tests

* refactor: more tests
2025-03-31 17:53:58 +01:00
Andrey Nering
180fcef364 docs: fix typo: source -> sources 2025-03-31 10:50:33 -03:00
renovate[bot]
f6baa5942e chore(deps): update all non-major dependencies to v19.0.12 (#2137)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 09:32:13 -03:00
Pete Davison
d54b0d6a2a chore: changelog for #2144 2025-03-30 19:22:37 +00:00
Pete Davison
03b242d4c3 fix: bug where undefined/null variables resolve to "" instead of nil (#2144) 2025-03-30 19:21:02 +00:00
Pete Davison
60e28ecdcc chore: changelog for #2121 2025-03-26 22:21:47 +00:00
Pete Davison
dd8daa68cd feat: allow wildcards to match multiple tasks (#2121)
* feat: allow wildcards to match multiple tasks

* docs: improved wildcard section
2025-03-26 22:17:27 +00:00
Pete Davison
55617e062f chore: changelog for #2081 2025-03-26 21:50:53 +00:00
Pete Davison
c6f1b3ae4f feat: make map variables experiment (prop 2) generally available (#2081)
* feat: make map variables experiment (prop 2) generally available

* docs: remove map variables experiment page and update usage to include map variable info
2025-03-26 21:40:09 +00:00
Andrey Nering
cb14a4f3a1 chore: add changelog for #2048 2025-03-22 20:15:26 -03:00
Andrey Nering
0d5f2b5dab feat(watcher): migrate to fsnotify (#2048) 2025-03-22 20:06:16 -03:00
Andrey Nering
89caf1e049 chore: add changelog for #2130 2025-03-19 10:36:07 -03:00
atusy
7f7e8306da fix(fish): fish completion error due to variable shadowing (#2130) 2025-03-19 13:33:32 +00:00
renovate[bot]
1f2eecda9e chore(deps): update dependency go to 1.24.x (#2126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 08:57:58 -03:00
renovate[bot]
60c959c75c chore(deps): update tj-actions/changed-files action to v46 (#2127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 08:57:33 -03:00
Pete Davison
a771e91ff3 chore: changelog for #2125 2025-03-16 13:20:36 +00:00
Timothy Rule
532644d7f8 feat: create NoSort sorter for CLI sort option "none" (#2125) 2025-03-16 13:17:14 +00:00
Pete Davison
b68f4067d9 chore: changelog for #2112 2025-03-12 19:59:54 +00:00
Pete Davison
c544b0058d fix: labels for experiments 2025-03-12 19:57:33 +00:00
Pete Davison
d1360ee72a refactor: embed the default Taskfile instead of defining it in code (#2112) 2025-03-11 13:53:08 +00:00
Pete Davison
076aff1f8e chore: changelog for #2085 2025-03-10 20:41:47 +00:00
Pete Davison
ffeb3bcc3f refactor: executor functional options (#2085)
* refactor: executor functional options

* refactor: minor tidy up of list code

* fix: WithVersionCheck missing from call to NewExecutor

* feat: docstrings for structs with functional options

* refactor: prefix the functional options with the name of the struct they belong to
2025-03-10 20:38:25 +00:00
Pete Davison
8181352d54 v3.42.1 2025-03-10 20:18:58 +00:00
Pete Davison
23fd7e782c chore: changelog for #2107 2025-03-10 11:48:10 +00:00
Pete Davison
6604b9a8cc fix: special variable type errors in vars with no task context (#2107)
* fix: stop dotenv trying to fetch variables when no dotenv specified

* fix: set special variables to "" when they can't be calculated
2025-03-10 11:46:07 +00:00
Andrey Nering
6ee1053c96 docs: fix link to nix package file 2025-03-08 22:53:58 -03:00
Andrey Nering
8eaf83599e fix(goreleaser): fix a deprecation warning 2025-03-08 22:44:05 -03:00
Andrey Nering
cd086228b2 v3.42.0 2025-03-08 22:34:07 -03:00
Andrey Nering
1b8b399c7e fix(changelog): add missing # to issue number 2025-03-08 22:32:55 -03:00
renovate[bot]
8426f84b18 chore(deps): update all non-major dependencies (#2097)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-07 08:24:04 +01:00
sblondon
14bbb324e5 doc: fix: remove a word (#2093)
The 'you' word has no sense here
2025-02-27 17:29:52 +00:00
Valentin Maerten
b9d202c491 chore: changelog for #2092 2025-02-26 18:07:31 +01:00
Valentin Maerten
c23c46e326 fix: include with dynamic vars (#2092) 2025-02-26 17:49:05 +01:00
Oleksandr Redko
a266fba93e chore: add linter mirror (#2060) 2025-02-24 09:06:54 -03:00
Pete Davison
fb631902ce refactor: run task through modernize tool (#2088) 2025-02-24 11:59:50 +00:00
Pete Davison
b14125bacd fix: remove debug line 2025-02-24 02:16:53 +00:00
Pete Davison
3c5782f4a4 chore: changelog for #2084 2025-02-23 18:31:18 +00:00
Pete Davison
60c8ee0ce6 refactor: ast.Call should be in main task package (#2084) 2025-02-23 18:30:42 +00:00
Pete Davison
cdaf69e03d chore: changelog for #2069 2025-02-23 18:18:22 +00:00
Pete Davison
d6234af49a feat: allow variable references in a matrix (#2069) 2025-02-23 18:13:56 +00:00
renovate[bot]
a31f2cf4a8 chore(deps): update all non-major dependencies (#2064) 2025-02-23 15:10:00 -03:00
Pete Davison
0dd6f78855 chore: changelog for #2086 2025-02-23 18:00:00 +00:00
Pete Davison
6f80777faf docs: getting started (#2086)
* docs: getting started

* docs: update intro with links to getting started docs
2025-02-23 17:56:55 +00:00
Valentin Maerten
8558e0c48a chore: changelog for #1982 2025-02-23 10:54:45 +01:00
Valentin Maerten
461714a899 feat: add a new .taskrc.yml to enable experiments (#1982) 2025-02-23 10:51:59 +01:00
Pete Davison
8a35033abc chore: changelog for #1798 2025-02-22 16:27:34 +00:00
Pete Davison
daf39a04bf feat: iterators (#1798)
* feat: update to github.com/elliotchance/orderedmap/v3

* refactor: better sort package

* feat: iterators

* chore: remove unnecessary code
2025-02-22 16:22:03 +00:00
Pete Davison
25f9299d0a chore: changelog for #2082 2025-02-22 16:09:53 +00:00
Pete Davison
4d15a8be8f feat: remove logger from taskfile package (#2082)
* refactor: remove logger from the taskfile node interface

* refactor: functional options on taskfile.Reader

* feat: use pass in debug/prompt functions to Reader rather than task Logger

* chore: reader docstrings

* fix: typo
2025-02-22 16:00:37 +00:00
Pete Davison
cbde4c33f8 chore: changelog for #2068 and #2052 2025-02-22 15:58:47 +00:00
Pete Davison
cdb6a3f70a feat: decoding improvements (#2068)
* refactor: moved/simplified snippets into its own file with tests

* refactor: move snippet to taskfile package

* feat: support snippets with line/col = 0

* feat: functional options for snippets

* feat: added option to hide snippet indicators

* feat: store raw lines for length calculations

* feat: add debug function for TaskfileDecodeError

* fix: decode errors from commands

* fix: schema for defer cmd calls

* fix: linting issues

* refactor: split var and vars into different files like other structures
2025-02-22 15:44:22 +00:00
Valentin Maerten
fb27318601 chore: changelog for #2052 2025-02-20 20:08:22 +01:00
Valentin Maerten
35ea4e0460 feat: display allowed values when vars are not provided (#2052) 2025-02-20 20:08:14 +01:00
Pete Davison
2b4d9bfba7 chore: changelog for #2059 2025-02-11 22:44:33 +00:00
Pete Davison
ce96447468 chore: bump minimum version to 1.23 (#2059)
* chore: bump minimum version to 1.23

* fix: version package for 1.24

* feat: update golangci-lint version
2025-02-11 22:43:17 +00:00
Pete Davison
e7a6de64cb chore: add package API changes to changelog and add gorelease tool (#2055)
* chore: add package API changes to changelog and add gorelease tool

* chore: use bullet points instead of a paragraph
2025-02-10 16:16:44 +00:00
Pete Davison
ff8c913ce7 chore: changelog and minor adjustments for #2018 2025-02-10 11:24:32 +00:00
Henrique Corrêa
0e23404d23 feat: specify --init filename/path (#2018)
* feat: specify init filename with --taskfile flag

previously, it was not possible to specify which filename to use when initializing a new Taskfile as it was hardcoded as "Taskfile.yml".

now the --taskfile flag specifies where to write the file to, and the first * contained in it will be replaced by "Taskfile", so `task -it *.yaml` will create a `Taskfile.yaml` file.

* docs: update CLI reference

* fix Flags header being inside tip admonition
* change -t flag's default column and add a description
* add Default Filenames section

* docs: revert adding Default Filenames section

I didn't realize it already existed elsewhere.

* refactor: use path instead of filepath on InitTaskFile

as requested to prevent ambiguity with the stdlib package.

* fix TestInit (incorrectly merged)

* docs: remove outdated info on --taskfile flag

* refactor task initialization changes

- remove const DefaultTaskInitFilename from taskfile/taskfile.go
- revert description of Entrypoint flag
- make InitTaskfile accept a path to either a file or a directory, and join the default Taskfile name+ext to it if it is a directory
- take the target file path from the first argument instead of the Entrypoint flag
- detect extension-only filenames (".yaml") instead of replacing "*" with "Taskfile"
- use different format in success log so that it makes sense at different paths than the current dir

* print colon instead of "at"

it's a lot cleaner in most cases.

* rewrite init tests

test both initializing to a directory path and a file path

* return final path from InitTaskfile

...and print it's relative representation

* fix lint error (ineffassign)

* use filepathext.TryAbsToRel() instead

* define and use filepathext.IsExtOnly()

* link to default filenames list in cli ref docs

(specifically in the --taskfile flag description)
2025-02-10 11:22:49 +00:00
renovate[bot]
65a64a01ee chore(deps): update all non-major dependencies (#2054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 07:53:45 -03:00
Pete Davison
f6ec7444d5 chore: changelog for #2049 2025-02-08 23:16:41 +00:00
Pete Davison
6ce798e16c feat: experiments logging improvements (#2049)
* feat: warn when enabling inactive experiments

* feat: TASK_ environment prefix

* feat: calculate experiment enabled/active instead of storing

* refactor: rename GetTaskVar to GetTaskEnv

* feat: experiments tests
2025-02-08 23:02:51 +00:00
Pete Davison
be81885835 feat: stop task test installing task (#2050) 2025-02-08 23:02:22 +00:00
Valentin Maerten
69ac06170a chore: changelog for #2031 2025-02-08 17:34:43 +01:00
Valentin Maerten
c995fe6d11 fix(checker): use only one checker at the same time to improve perf (#2031)
* fix(checker): use only one checker at the same time to improve performance

* refactor

* fix test
2025-02-08 17:34:04 +01:00
Valentin Maerten
9009124192 chore: changelog for #2033 2025-02-08 17:31:01 +01:00
Valentin Maerten
80f96d67da fix: requires allowed values works with dynamic var (#2033) 2025-02-08 17:29:36 +01:00
Valentin Maerten
002b8c929a docs: fix a typo in dotenv section 2025-02-08 16:13:34 +01:00
Pete Davison
b5b1524d3a feat: variable inheritance tests (#2038) 2025-02-05 19:51:52 +00:00
renovate[bot]
3aee0a0519 chore(deps): update react monorepo to v19 (#2028)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-31 10:32:44 +01:00
Pete Davison
23df1f0c61 chore: changelog for #2007 2025-01-29 22:49:14 +00:00
Ukjae Jeong
edbb83f6de fix: HTTPNode.Location when building graph (#2007)
* Fix HTTPNode.Location when building graph

* Add test and fix cache
2025-01-29 22:46:43 +00:00
Pete Davison
c903d5c6f4 chore: changelog for #2011 2025-01-29 22:43:51 +00:00
Henrique Corrêa
88c4ba1740 feat: make Taskfile initialization less verbose by default (#2011)
* change what is printed when creating Taskfile

When using --init to create a new Taskfile, it used to print the whole contents of the file to the terminal, which was unnecessarily verbose (and honestly felt unintentional).

Now only the filename is printed by default and the --silent and --verbose flags can be used to control the behavior (print nothing or content + filename, respectively).

* include additional new line with -i -v

it looks slightly better in the terminal.

* print init success text in green

* fix TestInit, create and pass in a logger

* move logging outside of InitTaskfile

- revert API changes made to InitTaskfile
- make consts in init.go public so they can be accessed from task.go
- rename variable "logger" to "log" in task.go to fix conflict with logger package

* move TestInit into init_test.go file

as requested by pd93.
2025-01-29 22:41:17 +00:00
Valentin Maerten
7d4c52546a chore: add label to renovate's PRs 2025-01-29 21:46:37 +01:00
Pete Davison
f5121de468 docs: broken links 2025-01-26 00:56:25 +00:00
renovate[bot]
b5d573fbd9 chore(deps): update golang's deps (#2020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-25 09:22:10 +01:00
renovate[bot]
888de0f8ef chore(deps): update website (#2021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-25 09:14:26 +01:00
Valentin Maerten
09b11d343b chore: remove dependabot and put Renovate weekly (#2017) 2025-01-25 09:06:53 +01:00
Andrey Nering
a2390d0dca v3.41.0 2025-01-18 11:15:57 -03:00
Andrey Nering
0f633091eb chore: fix typo on changelog 2025-01-18 10:54:07 -03:00
Andrey Nering
6b16c532c2 chore: add changelog for #1938 2025-01-18 10:27:21 -03:00
Lea Anthony
69f5714e45 fix: disable version check for use as an external library
Closes #1938
2025-01-18 10:26:58 -03:00
Andrey Nering
b3e4cfcf48 refactor: use modern loop syntax
ref #1980
2025-01-18 10:11:00 -03:00
EinoPlasma
65a71e5df3 refactor: signal handling to improve clarity and correctness (#1980) 2025-01-18 13:09:36 +00:00
jonathanagustin
bad2c8fcc1 docs: fix some examples to use spaces instead of tabs (#2002) 2025-01-18 10:04:39 -03:00
dependabot[bot]
97f41b710e chore(deps): bump github.com/go-git/go-git/v5 from 5.13.0 to 5.13.1 (#1992)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-05 16:51:59 +01:00
Pete Davison
240047152d chore: changelog for #1869 2025-01-02 20:11:00 +00:00
rohm1
24a830e384 fix: forward env to RunCommand when evaluating sh vars (#1869)
* forward env to RunCommand when evaluating sh vars. fixes #1742

* feat: added tests

* fix: test

---------

Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2025-01-02 20:07:25 +00:00
Pete Davison
fe9f489702 chore: changelog for #1989 2025-01-02 18:23:06 +00:00
Pete Davison
27de441ed2 docs: updated installation guides (#1989)
* docs: updated installation guides

* fix: installation method titles in sidebar

* feat: add instructions for pip

* fix: anchors in installation doc
2025-01-02 18:20:29 +00:00
renovate[bot]
79f7af2b04 fix(deps): update golang (#1983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-02 14:46:28 -03:00
Oren
b588d49cfb fix typo in usage.mdx (#1985) 2025-01-02 17:43:40 +00:00
renovate[bot]
45006e2ce0 fix(deps): update website (#1984)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-01 11:30:59 +01:00
Pete Davison
e5d8237053 docs: package api doc (#1981) 2024-12-31 16:08:58 +00:00
Valentin Maerten
89740ed72a chore: changelog for #1872 2024-12-31 16:06:44 +01:00
Niklas Rousset
c1e14c461b feat: make CHECKSUM and TIMESTAMP vars available in cmds commands (#1872) 2024-12-31 16:04:42 +01:00
Pete Davison
dc2eceb634 chore: update experiments field in issue template 2024-12-30 22:09:45 +00:00
Andrey Nering
43f3dcea05 chore(requires): skip unneeded variable evaluation for requires (#1976) 2024-12-30 18:27:16 -03:00
Valentin Maerten
f27daea5c9 chore: changelog for #1960 2024-12-30 19:17:55 +01:00
Pete Davison
49e88e92cf chore: changelogs for #1797, #1972 and #1974 2024-12-30 18:13:43 +00:00
Valentin Maerten
da40aabcc7 fix: task level vars are not ignored in requires (#1960)
Co-authored-by: MOKEKO <Anthurium.1605@gmail.com>
2024-12-30 19:11:27 +01:00
Pete Davison
8ce9bdc8c7 refactor: remove pointer from prefixed mutex 2024-12-30 18:03:29 +00:00
Graham Dennis
0409c3c3ba fix: concurrent mutations to prefixWriter (#1974) 2024-12-30 18:02:34 +00:00
Pete Davison
fd3532812e fix: orderedmap race condition (#1972) 2024-12-30 17:58:45 +00:00
Pete Davison
2965841eb7 feat: use external package for ordered maps (#1797) 2024-12-30 17:54:36 +00:00
Andrey Nering
dbe6e41ac8 chore(website): update navbar icons 2024-12-30 14:36:44 -03:00
Valentin Maerten
8f73ced037 fix: missing t.Parallel in some tests 2024-12-30 11:51:13 +01:00
Valentin Maerten
2a4f93eb41 chore: changelog for #1961 2024-12-30 11:51:13 +01:00
Valentin Maerten
9d8c4ba7e6 feat: add TASK_DIR special variable (#1961)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2024-12-30 11:45:25 +01:00
Valentin Maerten
1bda388925 chore: changelog for #1962 2024-12-30 10:20:07 +01:00
Valentin Maerten
d64df3f9d7 fix: evaluate requires before compiled task (#1962) 2024-12-30 10:15:17 +01:00
Valentin Maerten
d1f18d36b8 chore: changelog for #1859 2024-12-30 10:10:11 +01:00
Valentin Maerten
5f1d46c770 feat: can exclude task from being included (#1859) 2024-12-30 10:09:28 +01:00
Jonathan Rayner
9727eef476 docs: update Arch installation instructions (#1971) 2024-12-29 15:13:14 +01:00
Andrey Nering
c5be676555 chore(website): mention devowl.io as a gold sponsor 2024-12-20 10:23:01 -03:00
Pete Davison
f3317266dc feat: issue templates (#1963) 2024-12-16 12:36:45 -06:00
Andrey Nering
36ff00e3f9 chore: change some mentions of project authors 2024-12-11 22:04:41 -03:00
Lumberjackz
041063b732 docs: fix typo (#1895) 2024-12-11 21:50:43 -03:00
CeMoN24
2ab1dcbf1d docs: fix typo (#1896) 2024-12-11 21:50:05 -03:00
Matthias Vogt
24a0f24835 docs: fix typo (#1897) 2024-12-11 21:49:42 -03:00
christiandins
4dffab2e0a feat: add parallel test execution to improve runtime (#1882) 2024-12-11 21:47:10 -03:00
christiandins
b9a5d1c573 lint: add linter noctx (#1898) 2024-12-11 21:42:04 -03:00
renovate[bot]
e1818e9e31 chore(deps): update node.js to v22 (#1899)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-11 21:36:05 -03:00
dependabot[bot]
bb2de3fdf9 chore(deps): bump golang.org/x/crypto from 0.25.0 to 0.31.0 (#1949)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.25.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.25.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-12 00:24:44 +00:00
Martijn Pieters
82f6029043 docs: document defer task options (#1907) 2024-12-11 21:23:10 -03:00
Valentin Maerten
cfaecf8b4c chore: changelog for #1879 2024-12-07 16:16:47 +01:00
Danilo Bürger
4595c1e32a feat: add silent for defer (#1879)
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
2024-12-07 16:16:27 +01:00
dependabot[bot]
1a648dea50 chore(deps): bump golang.org/x/term from 0.26.0 to 0.27.0 (#1942)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-07 16:11:53 +01:00
renovate[bot]
a273183745 chore(deps): update website (#1935)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-07 16:11:20 +01:00
dependabot[bot]
e2243fc6d9 chore(deps): bump golang.org/x/sync from 0.9.0 to 0.10.0 (#1941)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-07 16:08:37 +01:00
Valentin Maerten
c1209d9f13 chore: changelog for #1921 2024-12-07 16:06:16 +01:00
mgbowman
2b54b04cfc fix: dynamic variable output in verbose mode (#1921)
Co-authored-by: Matthew Bowman <mbowman@nvidia.com>
2024-12-07 16:05:53 +01:00
Andrey Nering
32fa3a0156 v3.40.1 2024-12-06 09:59:04 -03:00
dependabot[bot]
973e928c28 chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /website (#1934)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-30 12:01:46 -03:00
Oleksandr Redko
bc844246d4 chore: allow using only github.com/go-task/task/v3/errors package (#1926) 2024-11-30 12:00:58 -03:00
dependabot[bot]
41884f0a69 chore(deps): bump github.com/Masterminds/semver/v3 from 3.3.0 to 3.3.1 (#1927)
Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/Masterminds/semver/releases)
- [Changelog](https://github.com/Masterminds/semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Masterminds/semver/compare/v3.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: github.com/Masterminds/semver/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-30 11:58:17 -03:00
dependabot[bot]
2a96c20739 chore(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#1928)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-30 11:58:00 -03:00
dependabot[bot]
c28eb204fb chore(deps): bump golang.org/x/term from 0.25.0 to 0.26.0 (#1913)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-15 21:54:17 +01:00
dependabot[bot]
b1535aedc1 chore(deps): bump golang.org/x/sync from 0.8.0 to 0.9.0 (#1914)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-15 21:50:03 +01:00
Valentin Maerten
7e3feb2993 chore: changelog for #1883 2024-11-15 21:49:21 +01:00
christiandins
8a79a41717 chore: add linter misspell (#1883) 2024-11-15 21:48:59 +01:00
Valentin Maerten
530818a742 chore: changelog for #1915 2024-11-15 21:42:15 +01:00
Dorian Karter
517bb3fc97 fix(json-schema): add missing platforms property to cmds for (#1915) 2024-11-15 21:41:54 +01:00
Valentin Maerten
6645a1f34c chore: changelog for #1917 2024-11-12 11:20:15 +01:00
Alexey Palazhchenko
2aa2963565 chore(deps): switch to mainted fork of git-urls (#1917) 2024-11-12 09:29:29 +01:00
Oleksandr Redko
390220ec9c fix: typos in docs, changelog, testdata, comments (#1910) 2024-11-07 13:25:59 -03:00
Andrey Nering
c3bd6b9384 chore(taskfile): fix goreleaser:install task to install correct version 2024-11-05 23:21:24 -03:00
Andrey Nering
d8e176311d v3.40.0 2024-11-05 22:34:38 -03:00
dependabot[bot]
1c68f0fee4 chore(deps): bump http-proxy-middleware from 2.0.6 to 2.0.7 in /website (#1886)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-05 19:58:26 +01:00
Pete Davison
118ef01a69 chore: changelog for #1904 2024-11-04 13:32:47 +00:00
Pete Davison
148b090d8e fix: bug where non-nil, empty dynamic variables are returned as an empty interface (#1904) 2024-11-04 13:30:39 +00:00
Norbert Hauriel
28a96d1427 docs(flags.go): flag description typo (#1905) 2024-11-04 12:58:48 +00:00
George Green
47f5e6ab89 docs: add an example of a default value usage in vars (#1893) 2024-11-01 20:04:46 +01:00
renovate[bot]
fe09c01637 chore(deps): update website (#1891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-29 15:31:56 +01:00
dependabot[bot]
7ef3164b16 chore(deps): bump github.com/fatih/color from 1.17.0 to 1.18.0 (#1885)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-29 15:00:57 +01:00
dependabot[bot]
b48a32b103 chore(deps): bump github.com/go-git/go-billy/v5 from 5.5.0 to 5.6.0 (#1884)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-29 14:52:53 +01:00
Valentin Maerten
2d2c408652 chore: changelog for #1890 2024-10-29 14:50:34 +01:00
Amogh Rameshappa Devapura
c381923d3e feat: add numCPU func (#1890) 2024-10-29 14:50:17 +01:00
Pete Davison
7bfddaa25a chore: changelog for #1866 2024-10-29 13:39:04 +00:00
Matheus Mina
5581954fb1 feat: allow providing single or multi prompts (#1866)
* Add new type to handle single or multi prompts

* update docs

* apply review
2024-10-29 13:37:03 +00:00
renovate[bot]
c4f708b222 fix(deps): update module mvdan.cc/sh/v3 to v3.10.0 (#1874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-21 19:52:54 +02:00
Valentin Maerten
27056a9827 chore: changelog for #1827 2024-10-18 18:17:18 +02:00
Valentin Maerten
a35910429c feat: option to ensure variable is within the list of values (#1827) 2024-10-18 18:16:57 +02:00
Valentin Maerten
9a7e79258c chore: changelog for #1771 2024-10-18 18:14:07 +02:00
Paulo Bittencourt
8dd3f4b119 refactor: re-organize node loading code to make it easier to follow (#1771) 2024-10-18 18:13:25 +02:00
Valentin Maerten
9ecc8fc878 chore: changelog for #1810 2024-10-09 09:14:56 +02:00
Valentin Maerten
e078261f12 fix: special variables are defined with dotenv at task level (#1810) 2024-10-09 03:14:23 -04:00
Andrey Nering
bdb3ffddd1 chore: add changelog for #1757 2024-10-05 21:42:35 -03:00
Paulo Bittencourt
a72e70b026 fix: inconsistent current directory resolution depending on include order (#1757) 2024-10-05 21:40:22 -03:00
Paulo Bittencourt
c5eea294aa ci: fix flaky TestForDeps tests (#1839) 2024-10-05 21:25:12 -03:00
renovate[bot]
0fff404eb8 chore(deps): update goreleaser/goreleaser-action action to v6 (#1852)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-06 00:21:52 +00:00
renovate[bot]
61172fa8da chore(deps): update dependency @types/react to v18.3.11 (#1851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 21:20:21 -03:00
dependabot[bot]
a6bc3f51cc chore(deps): bump golang.org/x/term from 0.24.0 to 0.25.0 (#1857)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/term/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-05 21:19:15 -03:00
renovate[bot]
1af7bf2670 chore(deps): update actions/github-script action to v7 (#1849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 03:27:06 -04:00
dependabot[bot]
d75536bf00 chore(deps): bump express from 4.19.2 to 4.21.0 in /website (#1815)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-29 16:08:03 -04:00
Valentin Maerten
ce3e058f89 chore: changelog for #1842 2024-09-29 22:05:33 +02:00
Paulo Bittencourt
8d0f0b049c fix: Print dotenv file path when there is an error reading file (#1842) 2024-09-29 16:03:48 -04:00
Valentin Maerten
e619bad4a9 chore: changelog for #1652 2024-09-24 19:45:59 +02:00
Valentin Maerten
e6ea0647d7 feat(remote): support include git remote (#1652) 2024-09-24 13:44:54 -04:00
renovate[bot]
d1dc271b9a chore(deps): update website (#1834)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 13:26:36 -04:00
Valentin Maerten
f5082f3692 chore: changelog for #1833 2024-09-24 19:23:18 +02:00
Valentin Maerten
30c59bf387 fix(remote): wait for prompt in the reader (#1833) 2024-09-24 13:21:09 -04:00
renovate[bot]
38d0fc2c55 chore(deps): update tj-actions/changed-files action to v45 (#1835)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 15:31:51 -04:00
George Rawlinson
460e587c66 fix: checksum override when passed via ldflags (#1830) 2024-09-23 13:45:41 -04:00
Valentin Maerten
ad5a3166ac chore: changelog for #1716 2024-09-21 17:24:33 +02:00
Valentin Maerten
ddccd1bb61 feat: add TASK_OFFLINE env and expose it as a special variable (#1716)
Co-authored-by: Pete Davison <pd93.uk@outlook.com>
2024-09-21 11:17:15 -04:00
Pete Davison
96a690ac2f chore: changelog for #1822 2024-09-20 17:08:54 +00:00
Piotr Stawarski
cb07189bab Fix: Cannot use splitArgs and splitLines in for-loops (#1823)
* Update variables.go

Probably solves https://github.com/go-task/task/issues/1822

* add type casting

* reorder to look better

* add suport for []int functions (until, untilStep)
2024-09-20 18:05:19 +01:00
Carlos Alexandro Becker
7e6577eb5f fix: snapshot builds and wrong winget version (#1824) 2024-09-20 10:13:42 -03:00
Pete Davison
58ab26c4ab v3.39.2 2024-09-19 12:25:29 +00:00
Valentin Maerten
65d332dfd0 chore: changelog for #1818 2024-09-19 14:24:35 +02:00
Valentin Maerten
5eaf0b2dcd fix: interpolate dynamic vars in defer (#1818) 2024-09-19 08:22:39 -04:00
Andrey Nering
56f3735b38 v3.39.1 2024-09-18 22:22:56 -03:00
Andrey Nering
23d578ac8c chore: add changelog entry for #1814 2024-09-18 22:20:51 -03:00
Valentin Maerten
1bf850592c fix: interpolate vars in defer (#1814)
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
2024-09-18 22:17:53 -03:00
Samuel Marks
0be05795b9 docs: exit code zero is not an error (#1811) 2024-09-18 22:16:59 -03:00
Valentin Maerten
08a2a91180 chore: changelog for #1809 2024-09-18 16:53:34 +02:00
Valentin Maerten
84cc5e57b0 fix(completions): zsh and powershell completions (#1809) 2024-09-18 10:46:02 -04:00
Valentin Maerten
5aa68e47e5 chore: changelog for #1806 2024-09-14 11:17:21 +02:00
Valentin Maerten
15aa4b86af fix: double help is printed when --help is provided (#1806) 2024-09-14 05:16:47 -04:00
Valentin Maerten
114d5e1404 fix(renovate): switch mode from silent to full 2024-09-09 21:55:52 +02:00
Andrey Nering
8ab5fe0e80 chore(website): disable crowdin completely (#1793) 2024-09-07 21:29:03 -03:00
Andrey Nering
c89a6add48 chore(website): upgrade docusaurus to the latest version (#1792) 2024-09-08 00:10:04 +00:00
Andrey Nering
888071e234 chore(website): added bluesky url to the footer 2024-09-07 20:58:29 -03:00
Andrey Nering
ff2e0f846a chore: update project taskfile 2024-09-07 19:31:01 -03:00
Valentin Maerten
3c177d3fdc chore: changelog for #1783 2024-09-07 23:09:01 +02:00
Valentin Maerten
41bc490e0f chore: configure Renovate (#1783) 2024-09-07 17:07:53 -04:00
Pete Davison
f8e3742d11 fix: add schema version to .goreleaser.yml 2024-09-07 20:34:10 +00:00
Pete Davison
a6100b39f8 fix: deprecated goreleaser field 2024-09-07 20:29:43 +00:00
Pete Davison
1275ab1b5b v3.39.0 2024-09-07 20:05:46 +00:00
dependabot[bot]
0c05dcbe0f chore(deps): bump github.com/mattn/go-zglob from 0.0.5 to 0.0.6 (#1791)
Bumps [github.com/mattn/go-zglob](https://github.com/mattn/go-zglob) from 0.0.5 to 0.0.6.
- [Commits](https://github.com/mattn/go-zglob/compare/v0.0.5...v0.0.6)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-zglob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-07 21:00:52 +01:00
Pete Davison
e9983e299f chore: changelog for #1713 2024-09-07 20:00:00 +00:00
dependabot[bot]
a450f2daea chore(deps): bump golang.org/x/term from 0.23.0 to 0.24.0 (#1790)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/term/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-07 20:55:27 +01:00
Valentin Maerten
c77c8a419b refactor: check if the remote exists just before reading it (#1713)
* refactor: check if the remote exists in the read to avoid doing it in offline mode

* fix: timeout error was not working

* fix: use cached copy if available
2024-09-07 20:54:05 +01:00
Andrey Nering
a233b52c65 chore: add changelog for #1777, #1778 2024-09-06 10:48:25 -03:00
Valentin Maerten
0e2c9cc88f fix: include flatten with a default task (#1778) 2024-09-06 10:44:28 -03:00
dependabot[bot]
dd9cec611a chore(deps): bump micromatch from 4.0.5 to 4.0.8 in /website (#1789)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 13:43:32 +00:00
dependabot[bot]
6985413f93 chore(deps): bump webpack from 5.91.0 to 5.94.0 in /website (#1776)
Bumps [webpack](https://github.com/webpack/webpack) from 5.91.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.91.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 10:41:39 -03:00
dependabot[bot]
cf77768c82 chore(deps): bump github.com/Masterminds/semver/v3 from 3.2.1 to 3.3.0 (#1779)
Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/Masterminds/semver/releases)
- [Changelog](https://github.com/Masterminds/semver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Masterminds/semver/compare/v3.2.1...v3.3.0)

---
updated-dependencies:
- dependency-name: github.com/Masterminds/semver/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 10:40:55 -03:00
dependabot[bot]
6c3b13b676 chore(deps): bump github.com/mattn/go-zglob from 0.0.4 to 0.0.5 (#1780)
Bumps [github.com/mattn/go-zglob](https://github.com/mattn/go-zglob) from 0.0.4 to 0.0.5.
- [Commits](https://github.com/mattn/go-zglob/compare/v0.0.4...v0.0.5)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-zglob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 10:40:31 -03:00
Pete Davison
ad45c7aeb3 chore: changelog for #1784 2024-09-02 21:45:19 +00:00
Pete Davison
e4b4d04abd fix: matrix loops should be deterministic (#1784) 2024-09-02 22:43:54 +01:00
Valentin Maerten
a3bdb6c40a chore: changelog for #1782 2024-09-02 22:10:05 +02:00
Valentin Maerten
eb39dd94d0 fix(completion): display aliases in fish completion (#1782) 2024-09-02 16:06:01 -04:00
Pete Davison
21cd573770 chore: changelog for #1767 2024-09-02 19:32:19 +00:00
Pete Davison
281d259e6e feat: loop over a matrix (#1767) 2024-09-02 20:29:00 +01:00
Pete Davison
1cb5daf73e chore: changelog for #1157 2024-09-02 19:28:41 +00:00
Pete Davison
3747b2ab7f feat: completion command (#1157) 2024-09-02 19:21:53 +00:00
Andrey Nering
d727ef5393 website: add @vmaerten as a maintainer 2024-09-02 16:04:52 -03:00
Valentin Maerten
a72b65b3b2 chore: changelog for #1704 2024-08-26 23:19:05 +02:00
Valentin Maerten
ef3b853728 feat: add option to declare an included Taskfile as flatten (#1704) 2024-08-26 17:17:39 -04:00
Valentin Maerten
f302b50519 chore: changelog for #1715 2024-08-25 23:06:58 +02:00
Valentin Maerten
c243b0ec7e fix(remote): TASK_REMOTE_DIR does not work when absolute (#1715) 2024-08-25 17:03:28 -04:00
Thanu Poptiphueng
32158dac87 docs: fix variable name (#1754) 2024-08-24 22:24:42 -03:00
Andrey Nering
0a59890a46 chore(dev): add .vscode/extensions.json with recommended extensions 2024-08-24 22:16:22 -03:00
Andrey Nering
defbcf6acd chore: add changelog for #1764 2024-08-24 21:57:09 -03:00
Daniel Story
045d054a5f feat: add ALIAS special var (#1764) 2024-08-24 21:50:45 -03:00
dependabot[bot]
0941de3318 chore(deps): bump mvdan.cc/sh/v3 from 3.8.0 to 3.9.0 (#1765)
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.8.0...v3.9.0)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 13:30:05 -03:00
Andrey Nering
b259edeb65 feat(defer): expose EXIT_CODE special variable to defer: (#1762)
Co-authored-by: Dor Sahar <dorsahar@icloud.com>
2024-08-14 22:53:14 -03:00
dependabot[bot]
35119c12ab chore(deps): bump axios from 1.6.2 to 1.7.4 in /website (#1760)
Bumps [axios](https://github.com/axios/axios) from 1.6.2 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.2...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 11:46:36 -03:00
Pete Davison
f6ff775d11 chore: changelog for #1758 2024-08-14 13:39:56 +00:00
Pete Davison
5e9851f42f Update minimum go version (#1758)
* feat: update minimum version to 1.22

* refactor: use int range iterator

* refactor: loop variables

* refactor: replace slicesext.FirstNonZero with cmp.Or

* refactor: use slices.Concat instead of append

* fix: unused param

* fix: linting
2024-08-14 08:37:05 -05:00
dependabot[bot]
51c569ef37 chore(deps): bump golang.org/x/term from 0.21.0 to 0.23.0 (#1751)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.21.0 to 0.23.0.
- [Commits](https://github.com/golang/term/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-11 11:31:48 -03:00
dependabot[bot]
1ca432a80d chore(deps): bump golang.org/x/sync from 0.7.0 to 0.8.0 (#1752)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/sync/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-11 11:28:10 -03:00
Ryan Halliday
e781b3d4e0 docs: update syslist links to the new location (#1747) 2024-08-09 13:14:03 +00:00
JonZeolla
81ff1cdea0 docs: fix special variables link (#1730) 2024-07-25 17:19:41 +00:00
Pete Davison
1f2cbfb932 chore: changelog for #1633 2024-07-16 22:48:15 +00:00
Valentin Maerten
4b6c79aca5 feat: experiment taskfile envs take precedence over os envs (#1633)
* feat: experiment taskfile envs take precedence over os envs

* fix test

* fix typo

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* docs: add p about default

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2024-07-16 23:44:34 +01:00
Pete Davison
5739495739 chore: changelog for #1719 2024-07-16 20:07:02 +00:00
Valentin Maerten
9d72fa3250 ci: add new workflow to check if versioned_docs has been modified (#1719) 2024-07-16 21:03:50 +01:00
Pete Davison
4123ffc780 chore: update go-task/template to tagged version 2024-07-16 17:51:55 +00:00
Valentin Maerten
cdafc67bef docs: add CLI_SILENT and CLI_VERBOSE in the docs (#1717) 2024-07-08 21:18:21 +00:00
Valentin Maerten
9ee4f21d62 fix: --version when a version is provided with -ldflags (#1711) 2024-07-05 14:53:36 -03:00
Alessio Perugini
133086d647 docs: update setup-task version (#1710) 2024-07-05 11:38:44 +00:00
Pete Davison
88b095020e v3.38.0 2024-06-30 14:50:47 +00:00
Pete Davison
cc14996b71 chore: changelog for #1656 2024-06-28 17:04:02 +00:00
Valentin Maerten
375106c988 fix: list-task with multiline desc (#1656)
* fix: list-task with multiline desc

* feat: display all lines aligned  in a table

* fix: display experiments

* use ladicle/tabwrite to handle color

* delete empty lines

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* remove all /n and replace by space

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2024-06-28 17:59:46 +01:00
Pete Davison
6ce6a38899 chore: changelog for #1639 2024-06-28 16:44:53 +00:00
Valentin Maerten
76030c9146 feat(remote): add a command to clear the cache (#1639)
* feat(remote): add a command to clear the cache

* Update cmd/task/task.go

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* rebase

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2024-06-28 17:42:16 +01:00
Pete Davison
a71020eab5 chore: update PR template to use comments instead of quotes 2024-06-28 16:22:49 +00:00
Pete Davison
6bef2ff8a9 chore: changelog for #1699 2024-06-28 16:16:58 +00:00
Vincent Smith
413dcd28a8 Add verbose/silent variables (#1669) 2024-06-28 17:13:52 +01:00
Pete Davison
da6f5c66a0 chore: changelog for #1636 2024-06-28 16:09:40 +00:00
Valentin Maerten
6012da7a21 feat(remote): prefix checksums/cached files with the filename (#1636)
* feat(remote): add the task filename in the checksum / cache filename

* prefix the filename with the lastDir from the path
2024-06-28 17:07:43 +01:00
Pete Davison
46c5eafe35 chore: changelog for #1661 2024-06-28 16:02:56 +00:00
Valentin Maerten
830b745112 feat(remote): global tempDir when the path is absolute (#1661)
* feat(remote): global tempDir is the path is absolute

* --wip-- [skip ci]

* fix lint

* rename checksum to fingerprint

* chore: Empty-Commit to trigger CI

* feat: add TASK_REMOTE_DIR

* handle relative path for TASK_REMOTE_DIR

* Remove unneedded extra blank lines

Co-authored-by: Andrey Nering <andrey@nering.com.br>

* add docs about TASK_REMOTE_DIR

---------

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2024-06-28 17:01:11 +01:00
Pete Davison
b52d4e4f40 chore: changelog for #1655 2024-06-28 15:53:03 +00:00
Pete Davison
3aaa3223a0 fix: run once in shared dependencies (#1655)
* fix: run once in shared dependencies

* feat: add test
2024-06-28 16:50:02 +01:00
Andrey Nering
a9ff58d0fe chore: add changelog entry for #1699 2024-06-27 11:23:09 -03:00
Meng Zhuo
eeaebaf8c7 chore(goreleaser): release riscv64 binaries on linux (#1699) 2024-06-27 14:19:54 +00:00
dependabot[bot]
2213141fcb chore(deps): bump braces from 3.0.2 to 3.0.3 in /website (#1697)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 14:12:03 +00:00
dependabot[bot]
19956889a7 chore(deps): bump ws from 7.5.9 to 7.5.10 in /website (#1696)
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 11:06:58 -03:00
Valentin Maerten
4c580ebf18 docs: add pacstall installation methode 2024-06-13 20:57:30 -03:00
Valentin Maerten
3dccde270a docs: improve install script 2024-06-13 20:57:30 -03:00
Pete Davison
53dd0b138a docs: taskfile versions (#1666) 2024-06-13 20:49:21 -03:00
Pete Davison
ea85909e8b chore: update deps 2024-06-09 20:30:43 +00:00
Pete Davison
6bf6fe7ead docs: ETA FAQ 2024-06-09 20:12:24 +00:00
Andrey Nering
f39c6352ac chore(website): make carbon work on blog pages 2024-06-05 21:51:49 -03:00
Andrey Nering
4294cc92b9 chore(website): add stack overflow and answer overflow to page footer 2024-06-05 21:35:15 -03:00
Pete Davison
40d77156df chore: changelog for #1572 2024-06-03 09:40:33 +00:00
Alexander Arvidsson
856ba3b8c2 feat: colorize tasks in prefixed output (#1572)
* feat: Colorize tasks in prefixed output

* chore: comment and style changes

* fix code tag has spaces in api reference

* fix: migrate to use logger for colors

* fix: Add bright colors to the color sequence

* fix: make colorized prefix logger standard
2024-06-03 10:37:24 +01:00
Pete Davison
0810ef01b0 fix: more docs typos 2024-06-03 09:28:53 +00:00
Pete Davison
527bbc3bf5 fix: docs typos/links 2024-06-03 09:06:34 +00:00
Andrey Nering
912bbcab8e chore: make github detect task as a go project again 2024-05-22 18:28:37 -03:00
Pete Davison
aa45491510 chore: changelog for #1663 2024-05-20 21:02:30 +00:00
Valentin Maerten
1e25ceab29 fix: version check (#1663)
* fix: version check

* refactor following review
2024-05-20 21:48:05 +01:00
Pete Davison
a74b0bc679 chore: changelog for #1654 2024-05-16 15:35:21 +00:00
Pete Davison
a3fce1c302 feat: variable references (#1654)
* feat: add references to the base code instead of the maps experiment

* feat: add template functions to ref resolver

* feat: tests

* docs: variable references

* feat: remove json and yaml keys from map variable experiment

* chore: typo
2024-05-16 16:20:59 +01:00
Pete Davison
7958cf50b3 chore: changelog for #1653 2024-05-16 10:16:49 +00:00
Pete Davison
b0efbad591 docs: template reference (#1653)
* chore: deprecation warnings for template functions

* docs: update reference pages
2024-05-16 11:11:52 +01:00
Valentin Maerten
30e9c7d4cd chore: update actions version because node 16 is deprecated (#1650) 2024-05-15 22:59:23 -03:00
dependabot[bot]
baa5e2c378 chore(deps): bump golang.org/x/term from 0.19.0 to 0.20.0 (#1651)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/term/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-15 22:58:26 -03:00
Andrey Nering
cc97e2da1d chore: add changelog for #1619 2024-05-15 22:27:29 -03:00
Andrey Nering
a55e21bbb7 chore: move changelog entries to the right section 🤦‍♂️ 2024-05-15 22:25:14 -03:00
Pete Davison
8d138a5eea feat: better yaml parsing and error handling (#1619) 2024-05-16 01:24:02 +00:00
Andrey Nering
635e3f4e7d chore: add changelog and documentation for #1624 2024-05-15 22:00:49 -03:00
Pete Davison
252d549e3f feat: task executable variable (#1624) 2024-05-15 21:50:18 -03:00
Andrey Nering
182d43e8d8 chore: added changelog for #1657 2024-05-15 21:47:38 -03:00
Pete Davison
f35e51e4e5 feat: better release task 2024-05-15 21:32:33 -03:00
Pete Davison
fb3c64c46e fix: prompt response should go on same line as message 2024-05-15 21:32:33 -03:00
Pete Davison
7535467f45 fix: prompt check shouldn't run if dry flag is true 2024-05-15 21:32:33 -03:00
Pete Davison
3e5cd6cdfd fix: prompt check should come after preconditions and fingerprinting 2024-05-15 21:32:33 -03:00
Pete Davison
dcc060af89 fix: missing additionalProperties false in schema 2024-05-15 21:32:33 -03:00
Pete Davison
55593090fa fix: typo in changelog 2024-05-13 08:54:27 +00:00
Pete Davison
57c094f415 v3.37.2 2024-05-12 19:36:09 +00:00
Pete Davison
2f4876b71c chore: changelog for #1649 2024-05-12 19:33:39 +00:00
Pete Davison
725f929778 fix: included variable merging (#1649) 2024-05-12 20:32:09 +01:00
Pete Davison
8266b28b48 chore: changelog for #1648 2024-05-12 19:27:39 +00:00
Pete Davison
f5c7472f64 fix: nil schema panic (#1648) 2024-05-12 20:25:54 +01:00
Pete Davison
ced3e7a579 fix: var_subkey schema 2024-05-10 16:41:02 +00:00
Orel Lazri
36dd71b122 fix(docs): add references to experiments links (#1644) 2024-05-09 21:30:20 +00:00
Andrey Nering
21531b6291 v3.37.1 2024-05-09 11:22:47 -03:00
Andrey Nering
bfc9d7847d fix: add changelog + fix for booleans for #1641 2024-05-09 11:21:12 -03:00
Valentin Maerten
3397f2855f fix: handle int and float env variable by converting them to string (#1641) 2024-05-09 11:14:38 -03:00
Jordan
78a69c4c3e chore: fix json schema typos (#1642) 2024-05-09 14:11:39 +00:00
Pete Davison
01716f55b3 chore: prep any variables for release (#1586)
* chore: release blog post

* chore: rename blog post to any-variables

* chore: update the release version in the blog

* chore: update blog date
2024-05-09 10:17:03 +01:00
Andrey Nering
ca364c20bb chore(goreleaser): fix deprecation warning 2024-05-08 21:40:50 -03:00
Andrey Nering
ee901fe568 v3.37.0 2024-05-08 21:32:16 -03:00
Pete Davison
7fa06eedf4 chore: changelog and docs for #1623 2024-05-08 15:49:01 +00:00
Pete Davison
651033c5a7 feat: stdin required -t - (#1623) 2024-05-08 16:44:05 +01:00
Valentin Maerten
17f6e816d8 fix(remote): do not display prompt if it's empty (#1634) 2024-05-05 16:10:32 +01:00
Pete Davison
cd259a741f chore: changelog for #1610 2024-04-29 21:32:42 +00:00
Valentin Maerten
c81dbda157 feat(remote): replace env variable in include remote URL (#1610)
* feat(remote): replace env variable in include remote URL

* use templating system instead of os.ExpandEnv

* lint
2024-04-29 22:27:30 +01:00
Michael Zhao
e23ef818ea docs: fix reference to GOOS and GOARCH link (#1628) 2024-04-29 15:01:18 -03:00
Pete Davison
ddd9964db7 feat: warn about move from any variables to map variables (#1618) 2024-04-24 21:40:52 +01:00
Pete Davison
a5b949f5dc chore: changelog for #1612 2024-04-24 19:50:03 +00:00
Pete Davison
630e58767b feat: ability to resolve refs using templating syntax (#1612)
* feat: resolve references using templating syntax

* refactor: moved when references are resolved to one place

* fix: linter

* docs: update map variables doc
2024-04-24 19:47:24 +00:00
Pete Davison
d87e5de56f chore: changelog for #1607 2024-04-24 17:35:48 +00:00
Pete Davison
f75aa1f84b feat: taskfile mutex for adding edge data 2024-04-24 18:33:56 +01:00
Pete Davison
53235f07ad feat: edge weight 2024-04-24 18:33:56 +01:00
Pete Davison
f19c520f23 feat: add support for multiple includes on a graph edge 2024-04-24 18:33:56 +01:00
Pete Davison
6951e5cd0c refactor: includes uses pointers 2024-04-24 18:33:56 +01:00
Andrey Nering
24059a4b76 chore(changelog): add entry for #1613 2024-04-23 22:58:56 -03:00
jwater7
fa022be1f9 chore(completions): support tilde home directory for zsh (#1613) 2024-04-24 01:57:43 +00:00
Andrey Nering
a3b9554efd chore: improve changelog for #1603 2024-04-23 22:49:12 -03:00
Tim Vergenz
16070c7a24 feat: add alias q for template function shellQuote (#1603)
Resolves #1601
2024-04-23 22:47:40 -03:00
Andrey Nering
72d9671fcf chore(website): disable translations for now (#1617) 2024-04-24 01:23:06 +00:00
Pete Davison
d01b3c8979 chore: changelog for #1563 2024-04-09 11:41:28 +00:00
Pete Davison
4024b4fa37 chore: remove code that outputs the graphviz file 2024-04-09 12:37:18 +01:00
Pete Davison
54c7f35b00 fix: linting issues 2024-04-09 12:37:18 +01:00
Pete Davison
3efb437c9a feat: merge concurrency 2024-04-09 12:37:18 +01:00
Pete Davison
e9448bd4be fix: advanced import operates on including file instead of included file 2024-04-09 12:37:18 +01:00
Pete Davison
8f3180a9fa fix: bug with merge code 2024-04-09 12:37:18 +01:00
Pete Davison
1d230af90d fix: advanced import resolving dynamic variables incorrectly 2024-04-09 12:37:18 +01:00
Pete Davison
fb9f6c20ab feat: merger 2024-04-09 12:37:18 +01:00
Pete Davison
6854b4c300 fix: include_with_vars test included the same file multiple times 2024-04-09 12:37:18 +01:00
Pete Davison
b10c573270 fix: missing task locations 2024-04-09 12:37:18 +01:00
Pete Davison
6ecfb634d2 fix: includes interpolation test 2024-04-09 12:37:18 +01:00
Pete Davison
6b3f8e29bb fix: optional includes 2024-04-09 12:37:18 +01:00
Pete Davison
220bf74a9e feat: better taskfile cycle error handling 2024-04-09 12:37:18 +01:00
Pete Davison
0a027df50d feat: better error handling for duplicate edges and fixed tests 2024-04-09 12:37:18 +01:00
Pete Davison
a50580b5a1 feat: dag reader 2024-04-09 12:37:18 +01:00
Pete Davison
1890722b75 chore: changelog for #1547 2024-04-09 11:28:12 +00:00
Pete Davison
1ff618cc17 feat: enable any variables without maps (#1547)
* feat: enable any variable experiment (without maps)

* chore: rename any_variables experiment to map_variables

* docs: create map variables experiment docs and update usage

* blog: any variables

* fix: links

* fix: warn about broken links instead of failing
2024-04-09 12:14:14 +01:00
Andrey Nering
eb2783fcce fix: fix bug for files with special chars &() (#1584) 2024-04-09 02:08:30 +00:00
Andrey Nering
43d84560e5 v3.36.0 2024-04-08 22:12:11 -03:00
Andrey Nering
1d4bb7b5ef chore: add changelog for #1576 2024-04-08 21:58:35 -03:00
Pete Davison
454fe65ef3 feat: support 8-bit color (#1576) 2024-04-08 21:49:44 -03:00
Andrey Nering
c6c69a5a63 fix: address compilation error on watch_test.go
Closes #1567

Co-authored-by: sunpe <sunpeng.dev@gmail.com>
2024-04-08 21:45:44 -03:00
Andrey Nering
1f157fef94 chore(crowdin): fixes to crowdin.yml (#1583) 2024-04-08 21:44:31 -03:00
dependabot[bot]
e269bcf028 chore(deps): bump golang.org/x/term from 0.18.0 to 0.19.0 (#1581)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/term/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 00:14:13 +00:00
dependabot[bot]
f06a4a35b1 chore(deps): bump express from 4.18.2 to 4.19.2 in /website (#1570)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 21:11:53 -03:00
dependabot[bot]
567d84c317 chore(deps): bump follow-redirects from 1.15.4 to 1.15.6 in /website (#1558)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 21:10:42 -03:00
dependabot[bot]
3c8ad5a77c chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /website (#1561)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 21:10:20 -03:00
dependabot[bot]
4db3759ace chore(deps): bump golang.org/x/sync from 0.6.0 to 0.7.0 (#1582)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.6.0 to 0.7.0.
- [Commits](https://github.com/golang/sync/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 21:08:49 -03:00
Andrey Nering
36fdd4e677 chore(website): upgrade crowdin cli 2024-04-03 23:16:34 -03:00
Andrey Nering
9c169ac9c6 chore(website): upgrade docusaurus (#1577) 2024-04-03 22:29:23 -03:00
Pete Davison
bb68fb333f chore: changelog for #1347 2024-03-25 19:20:39 +00:00
Pete Davison
64b7d3415a feat: use timeout in RemoteExists function 2024-03-25 19:13:27 +00:00
Pete Davison
a496a1dfa8 docs: remote root taskfiles 2024-03-25 19:13:27 +00:00
Pete Davison
b5df4e89c2 refactor: slightly improved NewBaseNode API 2024-03-25 19:13:27 +00:00
Pete Davison
9a5fb38f48 refactor: rename node resolver methods 2024-03-25 19:13:27 +00:00
Pete Davison
68191205c7 feat: don't send entire include to node resolvers 2024-03-25 19:13:27 +00:00
Pete Davison
cbc19d35ea feat: root remote taskfiles 2024-03-25 19:13:27 +00:00
Pete Davison
f00693052a feat: reorder icons 2024-03-21 01:04:07 +00:00
Pete Davison
5ab9329128 refactor: md -> mdx 2024-03-21 01:04:07 +00:00
Pete Davison
97cf02872f fix: update references to website directory 2024-03-21 01:04:07 +00:00
Pete Davison
7c61a59ecb refactor(website): rename docs -> website 2024-03-21 01:04:07 +00:00
Pete Davison
5538636373 feat: when nav is small float link icons to the left 2024-03-21 01:04:07 +00:00
Pete Davison
0c3c2d70a2 feat: single docs item in navbar 2024-03-21 01:04:07 +00:00
Pete Davison
faa9e07627 feat: move donate doc to pages 2024-03-21 01:04:07 +00:00
Pete Davison
d973871efa feat: move locale dropdown to the right 2024-03-21 01:04:07 +00:00
Pete Davison
c4d8b36e05 feat: icons instead of text links in navbar 2024-03-21 01:04:07 +00:00
Pete Davison
40e97bbbf4 fix: logo in next/intro docs and spacing 2024-03-21 01:04:07 +00:00
Pete Davison
41b45e6dc4 feat: update release tool to update latest doc version 2024-03-21 01:04:07 +00:00
Pete Davison
d2e26e2328 feat: add "latest" version 2024-03-21 01:04:07 +00:00
Pete Davison
96f13e5f2c chore: add crowdin:sync script to package.json 2024-03-21 01:04:07 +00:00
Pete Davison
29a1322577 chore: gitignore i18n directories 2024-03-21 01:04:07 +00:00
Pete Davison
4882f81f15 chore: remove sync crowdin workflow 2024-03-21 01:04:07 +00:00
Pete Davison
0bbdbc5739 chore: remove all translations 2024-03-21 01:04:07 +00:00
mattn
20e2dc7238 fix: use path/filepath instead of path (#1556) 2024-03-20 13:00:35 -03:00
tannevaled
696fb38f3b docs: update tea installation method to pkgx (#1546) 2024-03-11 09:33:28 -03:00
Pete Davison
0b74a57b4c fix: minor errors in docs 2024-03-11 10:34:58 +00:00
Pete Davison
4774273c98 fix: merge conflict 2024-03-10 19:09:27 +00:00
Pete Davison
a0a2cee218 chore: changelog for #1533 2024-03-10 17:30:52 +00:00
Pete Davison
c0a0faf3d3 fix: variables passed to included taskfile (#1533) 2024-03-10 17:28:04 +00:00
Pete Davison
a425e2bb6c chore: changelog for #1541 2024-03-10 17:24:35 +00:00
Pete Davison
f06f48e225 feat: looping over dependencies (#1541)
* feat: support for loops in deps

* chore: tests

* docs: looping over deps
2024-03-10 17:21:50 +00:00
Pete Davison
29e91a4137 chore: changelog for #1526 2024-03-10 17:17:53 +00:00
Pete Davison
08a888dc8a feat: parse templates in collection-type variables (#1526)
* refactor: replacer

* feat: move traverser to deepcopy package

* feat: nested map variable templating

* refactor: ReplaceVar function

* feat: test cases

* fix: TraverseStringsFunc copy value instead of pointer
2024-03-10 17:11:07 +00:00
dependabot[bot]
19a4d8f928 chore(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#1524) 2024-03-10 11:22:31 -03:00
dependabot[bot]
5c7ba665e5 chore(deps): bump golang.org/x/term from 0.17.0 to 0.18.0 (#1542) 2024-03-10 10:43:10 -03:00
Pete Davison
efb12c0c04 v3.35.1 2024-03-04 22:19:25 +00:00
Pete Davison
ac561db9dc chore: changelog for #1530 2024-03-04 11:39:21 +00:00
Pete Davison
3c05c9c6e1 fix: taskfile directory (#1530)
* fix: taskfile directory

* tests: add tests for special vars when running from a subdirectory
2024-03-04 11:34:44 +00:00
Pete Davison
60d20c042e chore: changelog for #1523 2024-03-03 22:47:20 +00:00
Pete Davison
aff1f5316d feat: taskfile special variable (#1523) 2024-03-03 22:45:23 +00:00
Pete Davison
d30539c17e refactor: move flags into their own package (#1521)
* feat: move flags to their own package

* refactor: move flag validation into flags package
2024-02-29 00:12:19 +00:00
Andrey Nering
5395921acc v3.35.0 2024-02-28 19:55:28 -03:00
Andrey Nering
8a73411803 chore: add changelog for #1520 2024-02-28 19:46:30 -03:00
Pete Davison
6c21568447 fix: list tasks (#1520) 2024-02-28 19:44:34 -03:00
David Fregoli
330722335d docs: improve wording (#1518) 2024-02-27 14:25:25 +00:00
dependabot[bot]
99397dfe98 chore(deps): bump mvdan.cc/sh/v3 from 3.7.0 to 3.8.0 (#1515) 2024-02-26 10:09:38 -03:00
Pete Davison
1157b213de chore: add changelogs for #1483 and #1489 2024-02-22 21:05:08 +00:00
Pete Davison
fa40e8a762 feat: more permissive file modes 2024-02-22 14:59:54 -06:00
Pete Davison
98e0cea469 docs: added reading from stdin section to usage 2024-02-22 14:59:54 -06:00
Pete Davison
508ff717c9 feat: add missing syntax highlighters 2024-02-22 14:59:54 -06:00
Pete Davison
c7ba42b81a fix: resolve directory correctly when using --dir 2024-02-22 14:59:54 -06:00
Pete Davison
bb9d582255 feat: stdin node 2024-02-22 14:59:54 -06:00
Pete Davison
38a06dad8e feat: error when multiple wildcard matches are found 2024-02-22 14:58:24 -06:00
Pete Davison
beb9f42215 docs: updated usage to include section on wildcard arguments 2024-02-22 14:58:24 -06:00
Pete Davison
df251de33e feat: tests for wildcard matching 2024-02-22 14:58:24 -06:00
Pete Davison
9a3d2bc3aa feat: wildcard matching of task names 2024-02-22 14:58:24 -06:00
Pete Davison
1ef5cf71d0 feat: pass ast.Call by reference 2024-02-22 14:58:24 -06:00
Andrey Nering
65fdb618aa chore: add changelog for #1491 2024-02-21 21:25:27 -03:00
teatimeguest
3b44da323b docs(api): remove duplicated entry for requires (#1491) 2024-02-21 21:24:12 -03:00
Andrey Nering
2c20407e1b chore: add changelog for #1495 2024-02-21 21:19:09 -03:00
iwittkau
27455fc4c8 docs: improve style guide docs (#1495) 2024-02-21 21:18:04 -03:00
Andrey Nering
971c3e3a01 chore: add changelog for #1510 2024-02-21 21:15:14 -03:00
kirkrodrigues
67b94798b7 docs: specify that variable declaration order is respected (#1510) 2024-02-21 21:13:40 -03:00
Andrey Nering
c465234aa9 chore: add changelog for #1512 2024-02-21 21:08:32 -03:00
Pete Davison
07a0b8938f refactor: bubble errors from ListTaskNames 2024-02-21 21:06:34 -03:00
Pete Davison
ba81181eb7 fix: setup logger if nil when listing task names 2024-02-21 21:06:34 -03:00
Pete Davison
e2b0789b0c chore: added changelog for #1500 2024-02-20 00:04:01 +00:00
Pete Davison
2c6969d572 chore: update go minimum version to 1.21 2024-02-17 23:29:49 -03:00
Pete Davison
8d0754af4d feat: go 1.21 2024-02-17 23:29:49 -03:00
dependabot[bot]
81148c312e chore(deps): bump golang.org/x/term from 0.16.0 to 0.17.0 (#1502) 2024-02-17 23:26:26 -03:00
Andrey Nering
1f477eb456 v3.34.1 2024-01-27 18:49:00 -03:00
Pete Davison
870c07eafb fix: remote prompt (#1487) 2024-01-27 18:45:13 -03:00
Andrey Nering
6682489967 v3.34.0 2024-01-25 21:43:38 -03:00
Pete Davison
d5b42e97ec refactor: use tf for taskfile instead of t 2024-01-25 21:23:28 -03:00
Pete Davison
d6b2926828 refactor: move task merge code into a method 2024-01-25 21:23:28 -03:00
Pete Davison
909ec1ed0f refactor: convert taskfile.Merge into a method 2024-01-25 21:23:28 -03:00
Andrey Nering
672e0198f9 chore: add changelog for #1478 2024-01-25 21:17:01 -03:00
Pete Davison
e9392df30b fix: experiment flags not working when .env is not in cwd (#1478) 2024-01-25 21:15:02 -03:00
Andrey Nering
d0efc1c5cd chore: add changelog for #1469 2024-01-25 21:12:37 -03:00
Pete Davison
3ff8fdbc0a feat: add ROOT_TASKFILE special variable (#1469) 2024-01-25 21:11:08 -03:00
Andrey Nering
6ebe2e765f chore: add changelog for #1465 2024-01-25 21:08:05 -03:00
Pete Davison
fa82051a06 fix: tests 2024-01-25 21:05:23 -03:00
Pete Davison
90a56df621 feat: update schema to accept semver strings 2024-01-25 21:05:23 -03:00
Pete Davison
26e79121f9 refactor: consistent naming for errors 2024-01-25 21:05:23 -03:00
Pete Davison
e2b85c6aa1 feat: version checks 2024-01-25 21:05:23 -03:00
Andrey Nering
8c0236c795 chore: fix typo on changelog 2024-01-25 21:01:26 -03:00
Andrey Nering
63ec83b8f7 chore: add changelog for #1482 2024-01-25 20:59:19 -03:00
Shaun Tabone
1b146543c5 fix(completions): support lowercase filename for Taskfile (#1482) 2024-01-25 20:57:21 -03:00
Andrey Nering
9ee0ea6ad1 chore: add changelog for #1476 2024-01-19 18:06:42 -03:00
Stephen Rosen
b377ddebff chore: add linting CI step for the JSON Schema
This is written to use `check-jsonschema` on the (current) latest
version (0.27.3).

It checks that the JSON Schema published in the docs is valid
under its declared metaschema (`$schema`).
2024-01-19 18:03:51 -03:00
Stephen Rosen
d6b9b30804 fix: malformed defer definition in JSON Schema
The `defer` definition listed `"string"` where `{"type":"string"}`
was wanted.
2024-01-19 18:03:51 -03:00
Stephen Rosen
149f6fe233 refactor: dedent JSON Schema 'definitions'
The default git diff algorithm isn't great at showing this because
it incorrectly matches some closing blocks against other, distant,
closing blocks. But this is all just a two-space dedent.
2024-01-19 18:03:51 -03:00
Stephen Rosen
0488a80ace fix: remove "versioning" from jsonschema defs
This removes the "3" nested in `definitions` which makes the contents
of `definitions` pass JSON Schema metaschema validation even when the
contents are not valid subschemas. `definitions` SHOULD contain
subschemas as its values, with no intermediate keys. (This is a MUST
in later JSON Schema spec versions, in which the key switches from
`definitions` to `$defs` as a related change.)

The contents are intentionally *not* dedented to make review easier.
2024-01-19 18:03:51 -03:00
task-bot
2cb68aff8b chore: sync translations (#1466) 2024-01-18 15:26:38 -03:00
Pete Davison
f1e2fee088 docs: improvements/corrections to experiments doc 2024-01-17 10:53:51 +00:00
Pete Davison
dc3cf1cb16 chore: changelog for #1438, #1464 2024-01-11 16:02:52 +00:00
Pete Davison
94aaea390f feat: merge template func should support variadic list of maps (#1464) 2024-01-11 16:00:52 +00:00
Pete Davison
40b6150030 chore: changelog 2024-01-11 15:12:11 +00:00
Pete Davison
dbc120c970 feat: support refs in dependencies 2024-01-11 14:44:04 +00:00
Pete Davison
25b1966506 feat: resolve variables in vars declarations too 2024-01-11 14:44:04 +00:00
Pete Davison
bff0a0a3d4 feat: updated schema.json 2024-01-11 14:44:04 +00:00
Pete Davison
b495a6bd0b docs: added docs for any variables proposal 2 2024-01-11 14:44:04 +00:00
Pete Davison
98ea907284 fix: bug where silent value was not deep copied on dependencies 2024-01-11 14:44:04 +00:00
Pete Davison
1f3fca50b3 feat: add ability to call task with variable by reference 2024-01-11 14:44:04 +00:00
Pete Davison
c655d90ab3 feat: add json and yaml variable constructors 2024-01-11 14:44:04 +00:00
Pete Davison
2ccf80713d feat: add sh and map (value) support 2024-01-11 14:44:04 +00:00
Pete Davison
d87e7981fb fix: don't report errors when fast compiling 2024-01-11 14:44:04 +00:00
Pete Davison
dfe39bfb5d feat: support multiple experiment values 2024-01-11 14:44:04 +00:00
Pete Davison
f6a24fe925 feat: added basic merge template function (#1438) 2024-01-11 14:29:14 +00:00
Pete Davison
d2522a6d9d fix: getSpecialVars 2024-01-11 14:00:30 +00:00
Pete Davison
e734e29009 refactor: move prompts into consts 2024-01-11 14:00:30 +00:00
Pete Davison
3b5fbf94f7 refactor: split read.go into taskfile.go and reader.go 2024-01-11 14:00:30 +00:00
Pete Davison
7cb45a23b6 refactor: orderedmap package -> omap 2024-01-11 14:00:30 +00:00
Pete Davison
1a03c3fbaf feat: includes should use OrderedMap 2024-01-11 14:00:30 +00:00
Pete Davison
d684e59b6a feat: store namespace directly in include 2024-01-11 14:00:30 +00:00
Pete Davison
5fc66293b0 refactor: IncludedTaskfiles -> Includes 2024-01-11 14:00:30 +00:00
Andrey Nering
bb16c3efca docs: document joinPath and relPath template functions 2024-01-10 22:28:11 -03:00
task-bot
f108fdd580 chore: sync translations (#1440) 2024-01-11 01:19:58 +00:00
Andrey Nering
33f90a8c16 chore: add changelog and documentation for #1452 2024-01-10 22:12:19 -03:00
Pete Davison
00896a1318 feat: add spew function to templater (#1452) 2024-01-10 22:04:45 -03:00
Andrey Nering
d797836cb8 chore(deps): upgrade x/exp/slices (#1462) 2024-01-11 01:02:05 +00:00
Andrey Nering
7393821d64 chore: add changelog for #1459 2024-01-10 21:40:10 -03:00
Pete Davison
42af0fc791 feat: invert call.Direct (#1459) 2024-01-10 21:32:49 -03:00
dependabot[bot]
07e6f5cad7 chore(deps): bump golang.org/x/term from 0.15.0 to 0.16.0 (#1458) 2024-01-11 00:31:24 +00:00
dependabot[bot]
334fd39e95 chore(deps): bump follow-redirects from 1.15.3 to 1.15.4 in /docs (#1461) 2024-01-11 00:30:32 +00:00
dependabot[bot]
c199aaeac9 chore(deps): bump tj-actions/changed-files in /.github/workflows (#1454) 2024-01-10 21:28:14 -03:00
dependabot[bot]
b4a7ad4fbe chore(deps): bump golang.org/x/sync from 0.5.0 to 0.6.0 (#1457) 2024-01-10 21:27:31 -03:00
Pete Davison
19bf2c2d48 fix: broken link in experiment auto-commenter 2023-12-31 02:15:40 +00:00
Pete Davison
61c0c32c2a fix: find and replace mistake 2023-12-29 20:42:30 +00:00
Pete Davison
bc88ad0de2 chore: changelog 2023-12-29 20:42:15 +00:00
Pete Davison
247c2586c2 refactor: taskfile/ast package (#1450)
* refactor: ast package

* feat: read -> taskfile

* refactor: taskfile.Taskfile -> taskfile.Read

* refactor: move merge function back into taskfile package

* refactor: rename taskfile.go to read.go
2023-12-29 20:32:03 +00:00
Pete Davison
2b67d05b9d feat: remove v2 support (#1447)
* feat: remove v2 support

* docs: update v2 schema docs
2023-12-29 20:26:02 +00:00
Pete Davison
212ff42304 docs: improved experimental docs formatting (#1445)
* docs: remove section from styleguide

* docs: update format of experiments/deprecations docs
2023-12-29 20:24:23 +00:00
Andrey Nering
b11be9d079 style: remove unneeded white space 2023-12-29 15:13:01 -03:00
Pete Davison
685a6f36d9 fix: only attempt to attach ad if sidebar ad container exists 2023-12-25 22:44:38 +00:00
Pete Davison
c569cbc220 chore(readme): fix another typo on link 2023-12-22 00:29:36 +00:00
Andrey Nering
58275b4b33 v3.33.1 2023-12-21 20:10:41 -03:00
Andrey Nering
862237a931 chore(readme): fix typo on link 2023-12-21 20:07:55 -03:00
Pete Davison
9d81608337 chore: changelog for #1437 2023-12-21 16:07:44 +00:00
Pete Davison
39a4b4d413 fix: variable propagation (#1437) 2023-12-21 16:04:45 +00:00
Pete Davison
21ceb05080 chore: changelog 2023-12-21 15:51:34 +00:00
Pete Davison
b592648d55 feat: support looping over map variables (#1436)
* feat: support looping over map variables

* feat: add .KEY variable
2023-12-21 15:43:56 +00:00
Pete Davison
658b6012a6 revert: docs back to .md files until prettier supports mdx 2023-12-21 15:20:14 +00:00
Pete Davison
311cdf00ab docs: add information about loops 2023-12-21 11:09:34 +00:00
Pete Davison
453538b405 chore: update any_variables doc to mdx 2023-12-21 02:26:53 +00:00
Andrey Nering
743a15f35b v3.33.0 2023-12-20 23:20:06 -03:00
Andrey Nering
f00ffad63d chore: changelog and docs for #1434 2023-12-20 23:17:44 -03:00
Andrey Nering
0d209ef05d docs: minor updates to the "any variables" experiment page 2023-12-20 23:11:50 -03:00
Pete Davison
e177f48e41 feat: CLI_FORCE special variable (#1434) 2023-12-21 02:08:57 +00:00
dependabot[bot]
e53dafa47e chore(deps): bump axios from 1.4.0 to 1.6.2 in /docs (#1433)
Bumps [axios](https://github.com/axios/axios) from 1.4.0 to 1.6.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.4.0...v1.6.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 23:07:22 -03:00
Pete Davison
7c93741670 feat: docusaurus v3 (#1432)
* feat: docusaurus v3

* feat: update release tool to stop it from converting links - this is now done use mdx plugins

* fix: broken links

* feat: more github links and prettier config

* chore: changelog

* fix: blog emoji
2023-12-21 01:59:29 +00:00
Pete Davison
43a2979e77 fix: non-evaluated nil values should be converted to empty strings to avoid empty interface errors in the templater 2023-12-20 19:55:25 -06:00
Pete Davison
cb195da72f chore: changelog 2023-12-20 19:55:25 -06:00
Pete Davison
77aaf996a1 feat: testdata 2023-12-20 19:55:25 -06:00
Pete Davison
7feceeae87 fix: handle errors when sh is used in Taskfiles with the any variables experiment enabled 2023-12-20 19:55:25 -06:00
Pete Davison
1eeb7d5cf9 fix: dynamic vars break with for because of fast-compiled tasks 2023-12-20 19:55:25 -06:00
Pete Davison
4a0414274f feat: for supports variables and lists of any type 2023-12-20 19:55:25 -06:00
Pete Davison
1a12b94bd3 feat: new dynamic variable syntax 2023-12-20 19:55:25 -06:00
Pete Davison
12a8fb0581 docs: any variables experiment 2023-12-20 19:55:25 -06:00
Pete Davison
20aad66e48 feat: update schema to support objects and arrays in vars 2023-12-20 19:55:25 -06:00
Pete Davison
1cd26ae1b9 feat: add ability to unmarshal as any when experiment enabled 2023-12-20 19:55:25 -06:00
Pete Davison
5516ac1a00 feat: change Var.Value from string to an any type 2023-12-20 19:55:25 -06:00
Pete Davison
de09e675c1 refactor: rename Var.Static to Var.Value 2023-12-20 19:55:25 -06:00
Pete Davison
f58257a208 feat: add any variable experiment flag 2023-12-20 19:55:25 -06:00
Pete Davison
abf0d29736 chore: changelog 2023-12-20 21:54:52 -03:00
Pete Davison
c5a2e92e5e feat: add aliases to --json output 2023-12-20 21:54:52 -03:00
Pete Davison
edb9dcd284 chore: bump golangci-lint version 2023-12-19 01:20:11 +00:00
William Sjökvist
cb0e6c5efc chore(docs): fix typo (#1422) 2023-12-13 13:35:02 -03:00
task-bot
4e35b1e9c2 chore: sync translations (#1418) 2023-12-13 13:34:35 -03:00
dependabot[bot]
1becb64d83 chore(deps): bump golang.org/x/term from 0.14.0 to 0.15.0 (#1419) 2023-12-13 13:34:20 -03:00
Andrey Nering
c4dce8f506 chore(docs): fix typo on "releasing" page 2023-11-29 23:17:32 -03:00
Andrey Nering
7c221ef999 v3.32.0 2023-11-29 22:40:04 -03:00
Pete Davison
ec35d43677 feat: support negative globs (#1324)
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2023-11-29 22:38:12 -03:00
task-bot
a7958c0e3b chore: sync translations (#1404) 2023-11-22 09:52:01 -03:00
Pete Davison
546a4d7e46 feat: prefer remote taskfiles over cached ones (#1345)
* feat: prefer remote taskfiles over cached ones

* feat: implemented cache on network timeout

* feat: --download always downloads, but never executes tasks

* feat: --timeout flag

* fix: bug with timeout error handling

* chore: changelog
2023-11-17 14:51:10 -06:00
Andrey Nering
834babe0ef chore: add changelog + improve code for #1368 2023-11-15 22:38:53 -03:00
Alexander Mancevice
8355f16809 feat: add --no-status flag (#1368)
disables status check when running with `--list` `--json` options
2023-11-15 22:31:02 -03:00
dependabot[bot]
db2414402f chore(deps): bump golang.org/x/term from 0.13.0 to 0.14.0 (#1395) 2023-11-15 21:42:36 -03:00
dependabot[bot]
c7f80a3be4 chore(deps): bump golang.org/x/sync from 0.4.0 to 0.5.0 (#1396) 2023-11-15 21:39:43 -03:00
dependabot[bot]
b883a25c9a chore(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0 (#1397) 2023-11-15 21:39:20 -03:00
task-bot
7fbded2b13 chore: sync translations (#1399) 2023-11-15 21:38:07 -03:00
task-bot
fb506acc27 chore: sync translations (#1389) 2023-11-07 11:15:18 -03:00
Andrey Nering
a8d3a69013 chore: update discord link on issue template
#1390
2023-11-07 11:13:35 -03:00
Iain Majer
30a2415ac8 Add silent to for_call schema (#1386)
* Add silent to for_call schema

* Update Changelog
2023-10-30 12:50:20 +00:00
Andrey Nering
b681ef9868 fix(platforms): do not run dynamic vars for other platforms (#1377) 2023-10-22 00:42:26 +00:00
task-bot
38efad5aa2 chore: sync translations (#1376) 2023-10-21 21:40:52 -03:00
Andrey Nering
6de3be1384 refactor(merge): use constant 2023-10-21 21:10:42 -03:00
Andrey Nering
781e55fce9 chore(website): remove gold sponsors section 2023-10-21 18:59:22 -03:00
task-bot
9b0de2e72e chore: sync translations (#1371) 2023-10-18 09:51:47 -03:00
dependabot[bot]
d4f7216256 chore(deps): bump @babel/traverse from 7.18.2 to 7.23.2 in /docs (#1374) 2023-10-18 09:51:17 -03:00
Andrey Nering
2842ae7fb5 chore(docs) add missing watch: true to example 2023-10-11 09:40:14 -03:00
task-bot
75aa066d9c chore: sync translations (#1367) 2023-10-07 22:10:49 -03:00
Andrey Nering
244aa93b3a chore(taskfile): add task to install goreleaser 2023-10-07 19:38:16 -03:00
Andrey Nering
6177376e50 v3.31.0 2023-10-07 19:10:57 -03:00
Andrey Nering
b5f6a237cc chore: add changelog entry for #1338 2023-10-07 19:03:25 -03:00
Marcello Sylvester Bauer
d741dfe26d fix(precondition): do not print error if context was aborted (#1338) 2023-10-07 19:01:57 -03:00
Andrey Nering
5168e54af7 chore: add changelog entry for #1343 2023-10-07 18:59:20 -03:00
Juan Ignacio Donoso
05755f3a52 fix: templates on task descriptions (#1343) 2023-10-07 18:57:14 -03:00
Pete Davison
dc77286282 feat: unify prompts (#1344) 2023-10-07 21:55:43 +00:00
Andrey Nering
222cd8c8f8 chore: add changelog entry for #1356 2023-10-07 18:41:35 -03:00
Oleg Butuzov
2f92f2ac5f fix: exclude other "ignored" files. (#1356) 2023-10-07 18:38:14 -03:00
Andrey Nering
a70f5aafc2 fix: increase max task calls limit from 100 to 1000
Closes #1321
Closes #1332
2023-10-07 18:29:16 -03:00
Andrey Nering
adfb96b637 feat: add ability to set watch: true in Taskfile (#1361) 2023-10-07 18:06:43 -03:00
dependabot[bot]
383746fcee chore(deps): bump golang.org/x/term from 0.12.0 to 0.13.0 (#1366) 2023-10-07 19:54:27 +00:00
dependabot[bot]
460ecdf8e9 chore(deps): bump golang.org/x/sync from 0.3.0 to 0.4.0 (#1365) 2023-10-07 16:48:45 -03:00
dependabot[bot]
74c503a33d chore(deps): bump postcss from 8.4.14 to 8.4.31 in /docs (#1364) 2023-10-07 16:48:25 -03:00
skaluzka
f0d25515e6 chore: remove accidentally added taskfile-dag.gv (#1357)
No real code changes here. It looks that an extra file has been
committed by mistake in b1ff13d3e8.

Signed-off-by: skaluzka <skaluzka@protonmail.com>
2023-10-01 16:32:04 +01:00
task-bot
9dc7502e4f chore: sync translations (#1336) 2023-09-20 09:53:38 -03:00
Pete Davison
078e213890 feat: error handling for undefined schema version (#1342)
* feat: error handling for undefined schema version

* docs: error codes

* chore: changelog
2023-09-19 19:21:40 +01:00
Pete Davison
b1ff13d3e8 docs: typo 2023-09-15 17:30:22 +00:00
Andrey Nering
f5aca75798 chore(docs): update branch name on some links 2023-09-14 21:45:25 -03:00
Andrey Nering
99d247e254 release: v3.30.1 2023-09-14 21:31:13 -03:00
Pete Davison
d1d312f396 refactor: minor improvements to setCurrentDir 2023-09-14 21:28:43 -03:00
Pete Davison
ba299aa71f fix: incorrect remote taskfiles cache directory 2023-09-14 21:28:43 -03:00
Pete Davison
92f30d4d70 chore: changelog 2023-09-14 21:28:43 -03:00
Pete Davison
93cccd4027 fix: only create a cache if the node is remote 2023-09-14 21:28:43 -03:00
Pete Davison
8e7e231aec fix: e.Dir not being set to the correct directory 2023-09-14 21:28:43 -03:00
Andrey Nering
72d77eb6c0 chore(deps): upgrade slim-sprig to v3.0.0 (#1329) 2023-09-14 01:59:35 +00:00
Andrey Nering
42ac242927 release: v3.30.0 2023-09-13 22:04:01 -03:00
Andrey Nering
d0551353f3 chore: add changelog entry for #1325 2023-09-13 21:43:40 -03:00
Reilly Brogan
1417f9f6cd feat(checksum): replace md5 with xxh3 to improve performance (#1325) 2023-09-13 21:26:48 -03:00
dependabot[bot]
978d66e148 chore(deps): bump golang.org/x/term from 0.11.0 to 0.12.0 (#1326) 2023-09-13 21:12:47 -03:00
task-bot
4fd69154a3 chore: sync translations (#1328) 2023-09-13 21:12:26 -03:00
Pete Davison
22ce67c5e5 feat: remote taskfiles (HTTP) (#1152)
* feat: remote taskfiles over http

* feat: allow insecure connections when --insecure flag is provided

* feat: better error handling for fetch errors

* fix: ensure cache directory always exists

* fix: setup logger before everything else

* feat: put remote taskfiles behind an experiment

* feat: --download and --offline flags for remote taskfiles

* feat: node.Read accepts a context

* feat: experiment docs

* chore: changelog

* chore: remove unused optional param from Node interface

* chore: tidy up and generalise NewNode function

* fix: use sha256 in remote checksum

* feat: --download by itself will not run a task

* feat: custom error if remote taskfiles experiment is not enabled

* refactor: BaseNode functional options and simplified FileNode

* fix: use hex encoding for checksum instead of b64
2023-09-12 22:42:54 +01:00
task-bot
84ad0056e4 chore: sync translations (#1323) 2023-09-04 09:46:45 -03:00
Pete Davison
07d5e80c57 fix: minor blog typos 2023-09-03 03:19:11 +00:00
Pete Davison
c6241af64a fix: il8n blog authors 2023-09-02 22:15:58 +00:00
Pete Davison
4f6eea8799 blog: introducing experiments 2023-09-02 21:52:43 +00:00
Pete Davison
a207289955 chore: update experiments and deprecation docs (#1315) 2023-09-02 17:48:05 -03:00
Andrey Nering
3f2abe011b chore: upgrade Go to v1.21.0 on lint and release actions 2023-09-02 17:43:45 -03:00
Pete Davison
afe8a618fe feat: node refactor (#1316)
* refactor: node reader interface

* refactor: rewrite Taskfile() as anon recursive func

* chore: NewNodeFromIncludedTaskfile

* chore: changelog
2023-09-02 21:24:01 +01:00
task-bot
b2e6c93b4b chore: sync translations (#1314) 2023-08-28 21:20:30 -03:00
Andrey Nering
c3d2437c3a chore(changelog): consolidate v3.29.0 and v3.29.1 2023-08-26 19:17:43 -03:00
Andrey Nering
e2552dae45 chore(website): update release docs to include instructions for winget 2023-08-26 19:17:24 -03:00
Andrey Nering
1189bdec87 goreleaser: skip automatic winget release on ci 2023-08-26 19:00:14 -03:00
Andrey Nering
f51f9621d1 fix: goreleaser deprecation on ci 2023-08-26 18:52:10 -03:00
Andrey Nering
19eba3cc14 v3.29.1 2023-08-26 18:45:44 -03:00
Andrey Nering
5b8b58b6d9 v3.29.0 2023-08-26 18:39:18 -03:00
Andrey Nering
d1f643ebd9 fix: --status flag should not have side-effects (#1313)
Closes #1305
Closes #1307

Co-authored-by: Giovanni Visciano <giovanni_visciano@yahoo.it>
2023-08-26 21:30:23 +00:00
Andrey Nering
e96712b020 fix: make sure USER_WORKING_DIR works corrently with includes (#1309)
Closes #1046
Closes #1205
Closes #1250
Closes #1293
Closes #1274
Closes #1309
Closes #1312

Co-authored-by: Marcus Spading <ms@fragmentum.net>
2023-08-26 21:06:50 +00:00
task-bot
6102900060 chore: sync translations (#1308) 2023-08-18 00:06:37 +00:00
Pete Davison
6f986af0d4 feat: bump minimum go version to 1.20 (#1302) 2023-08-11 22:46:37 +01:00
Andrey Nering
dd9b1a1065 chore: fix goreleaser deprecations 2023-08-09 22:50:07 -03:00
Andrey Nering
ae135f5203 chore: release automatically to winget using goreleaser 2023-08-09 22:44:29 -03:00
Calvin McLean
c42bc6914e fix: defer keyword in json schema
Closes #1288
2023-08-09 22:03:17 -03:00
Andrey Nering
0cddd8c167 chore(vscode): add sample settings.json with yaml schema configuration 2023-08-09 21:30:15 -03:00
Andrey Nering
22cd0edfc9 fix: signal and watch tests 2023-08-09 21:12:50 -03:00
Filip Solich
600966ac26 fix: add missing \n to watcher log
Closes #1285
Closes #1297
2023-08-09 21:09:11 -03:00
Andrey Nering
2b21fd2eda chore(website): reactivate carbon 2023-08-09 20:58:59 -03:00
task-bot
90a8c26b25 chore: sync translations (#1291) 2023-08-05 11:33:39 -03:00
dependabot[bot]
7145791f62 chore(deps): bump golang.org/x/term from 0.10.0 to 0.11.0 (#1298) 2023-08-05 11:33:18 -03:00
James Sansbury
d9a4b4241e docs: add required version for supporting loops (#1290) 2023-08-01 11:26:40 -03:00
task-bot
f219e1ee76 chore: sync translations (#1287) 2023-07-30 20:21:40 +00:00
skaluzka
c0d9c81393 docs: fix few typos in the api reference page (#1286) 2023-07-30 17:14:09 -03:00
task-bot
7bcdccc645 chore: sync translations (#1280) 2023-07-26 12:51:01 +00:00
Andrey Nering
44ca1fc77e release: v3.28.0 2023-07-24 22:12:09 -03:00
Andrey Nering
a16a5ea81a docs: small adjustment for #1220 2023-07-24 22:06:40 -03:00
Pete Davison
ca72f3c3a1 feat: added joinPath and relPath functions 2023-07-24 22:05:40 -03:00
Pete Davison
d447cc3f19 chore: make sources paths relative 2023-07-24 22:05:40 -03:00
Pete Davison
6be3ff6141 chore: sources instead of source 2023-07-24 22:05:40 -03:00
Pete Davison
36565bbbd2 fix: silent should be processed via taskCall 2023-07-24 22:05:40 -03:00
Pete Davison
755acd616c docs: for 2023-07-24 22:05:40 -03:00
Pete Davison
7ff1b1795e feat: for 2023-07-24 22:05:40 -03:00
Andrey Nering
7ece04e996 docs: add japanese and turkish translations (#1279) 2023-07-24 21:32:37 -03:00
Andrey Nering
d4d3571c96 changelog: add entry for #1263 2023-07-24 21:26:42 -03:00
Evan
364ddef56b fix: add nil guards in dependency merge (#1263) 2023-07-24 21:22:39 -03:00
Pete Davison
3908c05d14 chore: changelog 2023-07-24 21:13:37 -03:00
Pete Davison
6059ce2ac4 fix: exit codes for indirect tasks 2023-07-24 21:13:37 -03:00
task-bot
659ba317c1 chore: sync translations (#1267) 2023-07-24 20:53:17 -03:00
Andrey Nering
7e7a016df3 chore(docs): update formatting 2023-07-18 11:03:41 -03:00
task-bot
5041c8058d chore: sync translations (#1262) 2023-07-18 10:59:05 -03:00
dependabot[bot]
a66e804904 chore(deps): bump semver from 5.7.1 to 5.7.2 in /docs (#1258) 2023-07-11 11:17:44 -03:00
Andrey Nering
d6d571779d changelog: add entry for #1256 2023-07-08 11:44:57 -03:00
Hudson Clark
8a0689328b fix: propagate include vars in multi-level includes (#1256) 2023-07-08 11:42:38 -03:00
task-bot
2a0c99b5d8 chore: sync translations (#1253) 2023-07-08 11:08:59 -03:00
dependabot[bot]
6e3e95a721 chore(deps): bump golang.org/x/term from 0.9.0 to 0.10.0 (#1257) 2023-07-08 11:00:21 -03:00
Steve Russo
a4d242680b docs: fix two minor typos in usage.md (#1254) 2023-07-06 20:31:26 +00:00
task-bot
ee2e939d13 chore: sync translations (#1248) 2023-07-02 14:42:10 -03:00
Max Winterstein
788a63ca2f docs: add "tea" installation method (#1249) 2023-07-02 14:41:29 -03:00
Andrey Nering
dea98467c0 v3.27.1 2023-06-30 09:36:33 -03:00
Pete Davison
4e6ec14223 fix: ignore all errors when reading dotenv for experiments (#1245) 2023-06-30 09:33:37 -03:00
Andrey Nering
d6b7d532ed v3.27.0 2023-06-29 22:44:02 -03:00
Pete Davison
46f7bba90d feat: experiments flag (#1242) 2023-06-30 01:29:28 +00:00
Pete Davison
02f1c8482a fix: new line after prompts 2023-06-29 22:24:21 -03:00
Pete Davison
4de2ccea59 fix: remove duplicated quotes 2023-06-29 22:24:21 -03:00
Andrey Nering
0bf5fab9c0 chore(changelog): add entry for #1204 2023-06-29 22:20:10 -03:00
Andrey Nering
e97c48051e chore(changelog): fix typo 2023-06-29 22:15:09 -03:00
Ben Coleman
307f39cee3 feat: add ability to specify which vars are required (#1204) 2023-06-29 22:13:41 -03:00
task-bot
f346015d8c chore: sync translations (#1225) 2023-06-29 22:00:01 -03:00
Andrey Nering
a2f8adbb5c fix(interp): move from deprecated ExecHandler to the new ExecHandlers 2023-06-29 21:57:58 -03:00
dependabot[bot]
82510a04af chore(deps): bump mvdan.cc/sh/v3 from 3.6.0 to 3.7.0
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 21:57:58 -03:00
Andrey Nering
5eda349bbd chore(website): upcase "Crowdin" 2023-06-29 15:32:00 -03:00
Trim21
8d99c33472 chore(website): remove old chinese translation repo from community.md (#1243) 2023-06-29 18:26:26 +00:00
Pete Davison
5fdaa9aa36 feat: implement gentle force experiment draft (#1216)
* feat: implement gentle force experiment draft

* docs: changelog
2023-06-18 02:32:18 +01:00
Pete Davison
d8a12fe56d Support for experiment env vars (#1214)
* feat: experiments env var handling

* feat: read experiments from dotenv files

* docs: removed experimental cli flags

* feat: use vars instead of struct with reflection
2023-06-18 01:04:05 +00:00
task-bot
c79378f380 chore: sync translations (#1219) 2023-06-17 14:46:30 -03:00
Pete Davison
5e78171d3e feat: support lowercase Taskfiles (#1221) 2023-06-17 14:38:53 -03:00
Andrey Nering
d82b0faca1 chore(changelog): mention npm installation fixes 2023-06-17 11:54:04 -03:00
dependabot[bot]
26f3fb157f chore(deps): bump golang.org/x/term from 0.8.0 to 0.9.0 (#1223) 2023-06-17 11:45:59 -03:00
dependabot[bot]
7c66bcc857 chore(deps): bump @go-task/go-npm from 0.1.18 to 0.2.0 (#1224) 2023-06-17 11:45:03 -03:00
dependabot[bot]
1dd5d7ad1a chore(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0 (#1222) 2023-06-17 11:43:08 -03:00
Andrey Nering
667835f2a0 ci: disable github pages
We recently migrated to Netlify.
2023-06-14 20:31:57 -03:00
task-bot
427e0cd46d chore: sync translations (#1217) 2023-06-14 09:07:57 -03:00
Antoine Prouvost
92aa4927db chore(website): add conda community installation method (#1218) 2023-06-14 09:07:03 -03:00
Andrey Nering
5c68f87114 chore(website): update website colors (#1201) 2023-06-11 10:53:25 -03:00
Andrey Nering
ede8da7677 chore(website): add netlify badge 2023-06-10 22:49:09 -03:00
Andrey Nering
b44231a6b8 chore(changelog): fix typo 2023-06-10 22:33:17 -03:00
Andrey Nering
ae3884386d v3.26.0 2023-06-10 22:26:49 -03:00
Andrey Nering
6cc8d602fc chore(changelog): add entry for #1131 2023-06-10 22:12:22 -03:00
Tim De Pauw
e2c1b3b931 feat: add support for single cmd task syntax (#1131) 2023-06-10 22:08:28 -03:00
task-bot
59e99caf8a chore: sync translations (#1215) 2023-06-10 21:30:10 -03:00
task-bot
127b685104 chore: sync translations (#1206) 2023-06-10 21:18:54 -03:00
Pete Davison
5af361ab1c docs: add possible values for --sort 2023-06-10 21:12:02 -03:00
Pete Davison
06727c3892 chore: generalise the usage message 2023-06-10 21:12:02 -03:00
Andrey Nering
a452f0b4bd fix(docs): avoid <> as it breaks crowdin 2023-06-10 21:06:20 -03:00
dependabot[bot]
9ee714d048 chore(deps): bump golang.org/x/term from 0.3.0 to 0.8.0 (#1212) 2023-06-10 20:56:35 -03:00
Andrey Nering
76eb49c355 chore: update email address 2023-06-08 10:59:31 -03:00
Pete Davison
91878fccaf fix: api reference formatting 2023-06-06 19:44:08 +00:00
Andrey Nering
44aaec86a1 chore: improvements on #1163 + changelog entry 2023-06-03 22:33:22 -03:00
Max Cheetham
f815ce2901 feat(prompts): add ability for tasks to prompt user pre execution (#1163) 2023-06-03 22:33:00 -03:00
Pete Davison
105756eb27 docs: add comments from #1115 to faq and styleguide (#1202) 2023-06-03 21:30:45 -03:00
Pete Davison
7a2f8d691c feat: add a deprecation warning when running Taskfiles with a v2 schema (#1199) 2023-06-03 21:05:48 -03:00
Pete Davison
75659485ee feat: update issue templates 2023-06-03 20:54:36 -03:00
Pete Davison
18cb66f8c7 feat: add workflows for experiment labels 2023-06-03 20:54:36 -03:00
Pete Davison
45c3592818 feat: add experiments workflow 2023-06-03 20:54:36 -03:00
Pete Davison
2789801668 chore: move experiments into subfolder 2023-06-03 20:54:36 -03:00
Pete Davison
e09f42791a chore: update and re-order taskfile versions doc 2023-06-03 20:54:36 -03:00
Pete Davison
8d19ad306e chore: changelog 2023-06-03 20:54:36 -03:00
Pete Davison
793c1e5587 docs: add experiments doc and v2 deprecation notice 2023-06-03 20:54:36 -03:00
Andrey Nering
1a86c2c52d chore(readme): add entry for #1194 2023-06-03 19:23:57 -03:00
Andrey Nering
15cbe131fb fix(website): syntax highlight on json code block 2023-06-03 19:21:36 -03:00
Andrew Berry
082cdcc358 fix: only rewrite checksum files if the checksum has changed 2023-06-03 19:20:08 -03:00
Misite Bao
1936142042 feat(website): add spanish to language dropdown menu (#1187) 2023-06-03 15:45:51 -03:00
dependabot[bot]
8e4afa88f7 chore(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#1196) 2023-06-03 15:44:46 -03:00
Pete Davison
794de91d05 chore: update dependabot workflow label 2023-05-30 21:50:12 +00:00
Pete Davison
16bd9bc61e chore: update translations workflow label 2023-05-30 21:35:02 +00:00
Pete Davison
c0d3584626 chore: update label names in workflows (#1195) 2023-05-30 22:24:01 +01:00
task-bot
e0d3e33c32 chore: sync translations (#1188) 2023-05-28 17:51:17 -03:00
dependabot[bot]
e37c109f0c chore(deps): bump @go-task/go-npm from 0.1.17 to 0.1.18 (#1192) 2023-05-28 17:33:50 -03:00
Andrey Nering
efd8bab615 chore(deps): add dependabot configuration for npm package 2023-05-28 17:28:56 -03:00
task-bot
603463926e chore: sync translations (#1186) 2023-05-26 09:59:43 -03:00
Lucas Fernando Cardoso Nunes
31bbb47162 docs: correct typo (#1184) 2023-05-25 13:11:28 -03:00
task-bot
62b52911fa chore: sync translations (#1182) 2023-05-24 09:37:39 -03:00
Misite Bao
ac96612a17 style(website): improve language lable (#1183) 2023-05-24 09:31:46 -03:00
Misite Bao
3913701f7f chore: add environment variables to the deployment environment (#1181) 2023-05-23 20:48:53 -03:00
Andrey Nering
dcf66e7380 v3.25.0 2023-05-22 22:45:00 -03:00
Andrey Nering
188034650b chore(changelog): add some entries 2023-05-22 22:18:41 -03:00
Mads H. Danquah
e01b5565a2 docs: describe how to use the silent flag for dependencies (#680) 2023-05-22 22:09:29 -03:00
Mads H. Danquah
8bc98fedbf feat: make it possible to silence dependencies (#680) 2023-05-22 22:09:29 -03:00
Mads H. Danquah
9a406f5998 fix: ensure that calls to other tasks can be silenced (#680) 2023-05-22 22:09:29 -03:00
Trim21
f0e9751f7e chore: improve powershell completion script (#1168) 2023-05-22 21:47:11 -03:00
Trim21
0aa6c5eae8 chore(website): remove old chinese translation from the sidebar
Closes #1169
2023-05-22 21:38:58 -03:00
Misite Bao
785fc4ac3c feat(website): add translation progress
Closes #1173
Closes #1170
Closes #1102
2023-05-22 21:28:51 -03:00
task-bot
3eab444c03 chore: sync translations (#1180) 2023-05-22 21:00:19 -03:00
task-bot
b28aff04a7 chore: sync translations (#1156) 2023-05-22 20:51:56 -03:00
dependabot[bot]
81fd454ef4 chore(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#1175) 2023-05-22 20:49:34 -03:00
task-bot
65c923e07a chore: sync translations (#1155) 2023-05-07 22:43:56 -03:00
task-bot
45dd77ad6d chore: sync translations (#1154) 2023-05-06 21:24:46 -03:00
Misite Bao
51c2a104b2 docs: fix broken links and paths (#1143) 2023-05-06 21:16:11 -03:00
Andrey Nering
59ffb0a4c4 chore: add changelog entry for #1144 2023-05-06 21:13:19 -03:00
Andrey Nering
38341fffbd fix: print errors in red color
Using the logger package so envs like NO_COLOR and FORCE_COLOR keeps working.
2023-05-06 21:11:16 -03:00
Pete Davison
6633e65ee6 refactor: move TaskRunError handling into main function 2023-05-06 21:11:16 -03:00
Pete Davison
745de72d7e refactor: move flags into a package-level struct var 2023-05-06 21:11:16 -03:00
dependabot[bot]
af95e5b3e0 chore(deps): bump golang.org/x/sync from 0.1.0 to 0.2.0 (#1153) 2023-05-06 19:26:48 -03:00
Pete Davison
270ca697b2 fix: tabwriter in usage output (#1151) 2023-05-06 19:04:20 -03:00
Pete Davison
02ac79e577 chore: update contribution guide to support Task for Visual Studio Code 2023-05-06 19:03:02 -03:00
Pete Davison
031558afe4 chore: update github contribution file 2023-05-06 19:03:02 -03:00
Andrey Nering
eaf252f46d chore: update "sync translations" action 2023-05-06 18:59:11 -03:00
task-bot
bf043f411b chore(website): sync translations (#1145) 2023-05-06 18:55:50 -03:00
Pete Davison
7ec5cac56b fix: nil pointer when version is omitted (#1149) 2023-05-02 16:51:39 +01:00
task-bot
50d6e057d5 website: sync translations (#1140) 2023-04-26 21:31:30 -03:00
Andrey Nering
8adb9f4ece changelog: add entry for #1134 2023-04-26 21:29:15 -03:00
Clint Mod
c145658206 fix some errors being unintendedly supressed (#1134) 2023-04-26 21:28:54 -03:00
Pete Davison
8cfac5a25a refactor: remove newlines from formatter print functions (#1137) 2023-04-26 21:20:06 -03:00
Andrey Nering
1e8fc5011b website: fix sidebar order after inclusion of a new page on #1138 2023-04-26 21:14:00 -03:00
Andrey Nering
42dfc778f8 website: add rel="me" to Mastodon links
This is used for verification:
https://joinmastodon.org/verification
2023-04-26 21:13:51 -03:00
Pete Davison
90b11dd02e feat: improve docs for vscode-task (#1138) 2023-04-26 20:57:58 -03:00
task-bot
44b5b1b6ed Website: Sync translations (#1123) 2023-04-26 20:55:03 -03:00
Andrey Nering
c2523796c0 Add CHANGELOG entry for #1068 2023-04-15 18:24:15 -03:00
Andrey Nering
125f34ef47 chore: add freebsd to the list of operating systems to build
Ref #1068
2023-04-15 18:17:57 -03:00
Andrey Nering
5a361f7845 v3.24.0 2023-04-15 18:01:29 -03:00
Andrey Nering
52e0b59548 docs: another master -> main replace 2023-04-15 17:58:34 -03:00
Pete Davison
b42299a5aa feat: use mockery/testify for mocking instead of mockgen/gomock (#1118) 2023-04-15 17:27:14 -03:00
Pete Davison
f9c77acd96 feat: custom error codes (#1114) 2023-04-15 17:22:25 -03:00
Andrey Nering
9ec544817f Add CHANGELOG entry for #1113 2023-04-15 16:52:46 -03:00
Patrick Jackson
606a8f9db5 fish: fix completions for tasks with aliases (#1113) 2023-04-15 16:51:44 -03:00
Andrey Nering
6995cd71d9 Add CHANGELOG entry for #1049 2023-04-15 16:44:20 -03:00
Pete Davison
d9165646c6 chore: update refs from master to main (#1048) 2023-04-15 16:39:35 -03:00
task-bot
720137304b Website: Sync translations (#1111) 2023-04-15 16:18:51 -03:00
Misite Bao
8026d8ddb3 Configure Prettier for Markdown formatting (#1112) 2023-04-15 16:13:29 -03:00
dependabot[bot]
7876ccb3bc Bump github.com/Masterminds/semver/v3 from 3.2.0 to 3.2.1 (#1121) 2023-04-15 16:07:37 -03:00
Pete Davison
f22389a824 feat: implement task sorting with --sort flag (#1105)
* refactor: move deepcopy into its own package

* feat: add generic orderedmap implementation

* refactor: implement tasks with orderedmap

* feat: implement sort flag for all task outputs

* refactor: implement vars with orderedmap

* chore: docs

* fix: linting issues

* fix: non deterministic behavior in tests
2023-04-06 12:07:57 +01:00
Pete Davison
719f30219b refactor: use require for testing errors (#1100) 2023-04-06 11:18:41 +01:00
Andrey Nering
cfa409b5e7 Add CHANGELOG entry for #1107 2023-04-05 22:21:38 -03:00
Mads Høgstedt Danquah
1b30c9dbca Make status checks respect task and global silent mode (#1107) 2023-04-05 22:18:58 -03:00
Pete Davison
09c9094a6b feat: enforce gofumpt linter 2023-04-05 21:55:42 -03:00
Pete Davison
aab51c331f refactor: enable gofmt linter and fix all issues
- also rewrite 'interface{}' as 'any'
2023-04-05 21:55:42 -03:00
Misite Bao
a6d57496c2 Website: Fix typo on usage.md (#1104) 2023-04-05 21:52:27 -03:00
Misite Bao
f285d5dbf7 Fix upload-source-documents.yml (#1101) 2023-04-05 21:51:25 -03:00
task-bot
79fde26f4f Website: Sync translations (#1103) 2023-04-05 21:48:43 -03:00
task-bot
a729ee6fca Website: Sync translations (#1093) 2023-03-30 22:25:31 -03:00
Andrey Nering
451a3773c3 GitHub Action: Automatic upload not working. Switch to manual trigger 2023-03-30 22:09:14 -03:00
Andrey Nering
38ade8fbc9 Documentation: Update link 2023-03-30 22:05:20 -03:00
Andrey Nering
c229570bd9 GitHub Action: Fix upload documents workflow
The previous used action verified if any changes happened *during execution*
(via a `git diff` call).

Changing to the one that is properly able to check changes in the last commit.
2023-03-30 22:00:47 -03:00
Andrey Nering
ce14f10297 Small adjustments for #1090
Wrap text in 80 chars.
2023-03-30 21:53:06 -03:00
Misite Bao
5430c49833 docs: add winget installation instructions (#1090) 2023-03-30 21:51:03 -03:00
Andrey Nering
510b977cea GitHub Action: Use token to avoid rate limit issues 2023-03-30 21:33:17 -03:00
Andrey Nering
7a966d8c1b Add CHANGELOG entry for #1098 2023-03-30 21:26:53 -03:00
André Klitzing
bdf7fb0858 Ignore .hg for Mercurial, too (#1098) 2023-03-30 21:25:08 -03:00
Misite Bao
a80da8b65c docs: optimize document style (#1091) 2023-03-30 21:15:42 -03:00
Pete Davison
22983bcdd3 feat: release tool improvements (#1096) 2023-03-30 21:10:11 -03:00
task-bot
4d4acc72f0 Website: Sync translations (#1089) 2023-03-26 22:43:22 -03:00
Misite Bao
d7d8d3411c chore: add scheduled task for sync documents 2023-03-26 22:35:01 -03:00
Misite Bao
006097bee2 chore: add auto upload source documents workflow 2023-03-26 22:35:01 -03:00
Andrey Nering
4b23d63d39 v3.23.0 2023-03-26 21:42:46 -03:00
Pete Davison
d8053f64ef Prepare for upcoming extension release (#1088) 2023-03-26 21:14:19 -03:00
Pete Davison
4cbdcb2659 chore: changelog 2023-03-26 20:58:20 -03:00
Pete Davison
5583cea936 feat: create release command 2023-03-26 20:58:20 -03:00
Pete Davison
cc1fd3d03e fix: deep copying pointers inside slices (#1072) 2023-03-25 16:13:06 -03:00
Misite Bao
d72eb009e4 docs: optimize document structure (#1074) 2023-03-25 16:09:31 -03:00
Pete Davison
738ffde962 fix: checksum variable in status is incorrect (#1080)
* fix: checksum variable in status is incorrect

* chore: changelog
2023-03-23 16:09:16 -05:00
Pete Davison
34f15a4976 fix: broken link to scoop bucket (#1073) 2023-03-21 10:42:51 -03:00
github-actions[bot]
c807c7bd39 Website: Sync translations (#1071) 2023-03-20 22:50:37 -03:00
Andrey Nering
1081231b7c Adjustments to GitHub Actions 2023-03-20 22:45:23 -03:00
Andrey Nering
fc50b846c4 CHANGELOG entry + Small adjustments to #1058 2023-03-20 22:33:24 -03:00
Misite Bao
eead5f44fc docs: add Simplified Chinese translation 2023-03-20 22:25:34 -03:00
Misite Bao
fc0280a6ab feat(website): add Crowdin CLI tool and workflow 2023-03-20 22:25:34 -03:00
Misite Bao
65f5222a2a feat(website): add Simplified Chinese menu 2023-03-20 22:25:34 -03:00
Misite Bao
54b5d4d389 feat(website): write English translations 2023-03-20 22:25:34 -03:00
dependabot[bot]
ee36c8ba9c build(deps): bump github.com/fatih/color from 1.14.1 to 1.15.0 (#1070) 2023-03-20 21:52:13 -03:00
Pete Davison
e40d2eec9e feat: add task location data to json output (#1056)
* feat: add task location data to json output

* feat: add root taskfile location to --json output
2023-03-17 12:34:06 +00:00
Misite Bao
15ef1fa1c2 Make --init generate .yml instead of .yaml (#1062) 2023-03-16 21:53:01 -03:00
Andrey Nering
291ee123c9 CHANGELOG: Mention contributor 2023-03-16 21:42:11 -03:00
Andrey Nering
1b7009f4d5 CHANGELOG: Add references to entry 2023-03-16 21:40:23 -03:00
Dhanu Saputra
9c3ee234f1 Add splitArgs template function (#1059) 2023-03-16 21:38:24 -03:00
dependabot[bot]
e0fcb040ee build(deps): bump @sideway/formula from 3.0.0 to 3.0.1 in /docs (#1064)
Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 14:46:23 -03:00
dependabot[bot]
fc2b0e0fee build(deps): bump webpack from 5.72.1 to 5.76.1 in /docs (#1060)
Bumps [webpack](https://github.com/webpack/webpack) from 5.72.1 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.72.1...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 14:40:35 -03:00
Sorin Sbarnea
44bc0971ad Website > Community: Document mk tool support (#1052) 2023-03-12 16:01:19 -03:00
Pete Davison
8717c4c287 Merge pull request #1047 from go-task/contribution-guide
chore: minor fixes to contribution guide
2023-03-10 19:28:26 +00:00
Pete Davison
cf542f6fdf chore: minor fixes to contribution guide 2023-03-10 18:51:14 +00:00
Andrey Nering
94e4a2431b Merge branch 'master' of https://github.com/go-task/task 2023-03-10 15:37:40 -03:00
Andrey Nering
3eb4c9eae8 v3.22.0 2023-03-10 15:35:56 -03:00
dependabot[bot]
5ecabc5fe2 build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#1036)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-10 15:31:39 -03:00
Pete Davison
0838d48ee3 refactor: decouple fingerprinting from executor (#1039) 2023-03-10 15:27:30 -03:00
Pete Davison
c64f8818be Merge pull request #1043 from go-task/update-install-from-source-docs
chore: remove installation docs for Go 1.15
2023-03-09 19:16:57 +00:00
Pete Davison
97ffd84d0e chore: remove installation docs for Go 1.15 2023-03-09 19:07:05 +00:00
Andrey Nering
f2114f09f7 Fix capitalization of flags descriptions on task -h
Also, adds missing periods.
2023-03-08 23:24:39 -03:00
Andrey Nering
9c844850e4 Add --global (-g) flag (#1029)
This will run a Taskfile from the home directory, i.e., `$HOME/Taskfile.yml`.
2023-03-08 23:21:23 -03:00
Andrey Nering
68aef2ef0d Add CHANGELOG entry for #1022 2023-03-08 22:37:04 -03:00
Dennis Jekubczyk
88d644a7e9 Add ability to set error_only: true on the group output mode 2023-03-08 22:34:52 -03:00
dependabot[bot]
4b97d4f7f5 build(deps): bump dns-packet from 5.3.1 to 5.4.0 in /docs (#1034)
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v5.3.1...5.4.0)

---
updated-dependencies:
- dependency-name: dns-packet
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-08 22:23:31 -03:00
Andrey Nering
bc14c633ae Taskfile: Remove task commited by mistake 2023-03-08 22:21:27 -03:00
Pete Davison
a29e5d39ca Merge pull request #1037 from go-task/fix-status-and-sources
fix: status and sources
2023-03-07 00:35:45 +00:00
Pete Davison
f1506ee500 fix: status and sources 2023-03-07 00:30:24 +00:00
Andrey Nering
6e346de9fb CHANGELOG: Add entry for #1035 2023-03-06 09:47:33 -03:00
Harel Wahnich
99ab2a4d62 for task up to date check both status and sources (#1035)
* remove redundant if statement

* add subtests to TestStatusChecksum
2023-03-05 22:16:41 -08:00
Pete Davison
d4ed7c3cfc Merge pull request #1004 from go-task/semver
feat: use semver package for taskfile schema version
2023-03-02 19:07:52 +00:00
pzloty
bc0554575a Fix output "prefixed" option in schema.json (#1031)
Fix the output option to match implementation and documentation.
2023-03-02 10:42:11 -03:00
Andrey Nering
1f4906244b Add CHANGELOG for #1025 2023-03-01 22:06:16 -03:00
Bevan Arps
52756ab83e Fix deadlock issue with run: once (#1025) 2023-03-01 21:53:38 -03:00
Pete Davison
97dcbe6932 Merge pull request #1026 from go-task/fix-schema-for-group
fix: schema for output group
2023-02-28 13:49:03 +00:00
Pete Davison
e35bf22dd3 fix: schema for output group (#1005) 2023-02-28 11:50:26 +01:00
Andrey Nering
a36b1b9cec Website: Remove Carbon 2023-02-23 19:30:10 -03:00
Andrey Nering
1920ee38c3 v3.21.0 2023-02-22 22:12:48 -03:00
João Pedro
ec2110e58f Add new TASK_VERSION special variable
Closes #1014
Closes #990
2023-02-22 22:08:38 -03:00
Andrey Nering
12a1cd6f62 Docs: Update API page 2023-02-16 21:16:43 -03:00
Aleksandr Komlev
9af056e746 Add FORCE_COLOR env support (#1003) 2023-02-16 21:12:44 -03:00
Pete Davison
c8fe450623 Merge pull request #1010 from go-task/go-1-20
chore: update to go 1.20
2023-02-13 13:33:51 +00:00
Pete Davison
ab1fe742f3 chore: update to go 1.20 2023-02-13 13:28:49 +00:00
Pete Davison
8b72c86ba5 feat: use semver package for taskfile schema version 2023-02-10 18:14:38 +00:00
Pete Davison
28c5f4a635 Merge pull request #1007 from go-task/fix-tasks-being-incorrectly-marked-as-internal
fix: tasks being incorrectly marked as internal
2023-02-10 18:14:01 +00:00
Pete Davison
74f69a21cd fix: tasks being incorrectly marked as internal 2023-02-10 17:02:11 +00:00
dependabot[bot]
e23dacd6d4 build(deps): bump github.com/joho/godotenv from 1.4.0 to 1.5.1 (#1002)
Bumps [github.com/joho/godotenv](https://github.com/joho/godotenv) from 1.4.0 to 1.5.1.
- [Release notes](https://github.com/joho/godotenv/releases)
- [Commits](https://github.com/joho/godotenv/compare/v1.4.0...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/joho/godotenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 09:41:37 -03:00
Andrey Nering
58d582941b Documentation: Remove mentions of Minify in favor of esbuild 2023-02-04 20:29:10 -03:00
dependabot[bot]
3bbc51949c build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /docs (#1000)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-04 18:51:05 -03:00
Andrey Nering
69e0254a99 Website: Update 2023-01-29 15:42:59 -03:00
Andrey Nering
1091a914bd Documentation: version: '2' -> version: '3'
https://github.com/go-task/task/pull/929#discussion_r1082370557
2023-01-29 15:39:45 -03:00
dependabot[bot]
ecc65a218e build(deps): bump github.com/fatih/color from 1.13.0 to 1.14.1 (#995)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-28 08:07:12 -03:00
dependabot[bot]
426ed7eff6 build(deps): bump ua-parser-js from 0.7.31 to 0.7.33 in /docs (#991)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-27 09:55:18 -03:00
Andrey Nering
73aba36309 v3.20.0 2023-01-14 17:34:15 -03:00
Andrey Nering
cb393ccd3a Add CHANGELOG entry + small adjustments to #977 2023-01-14 17:18:26 -03:00
Amin Yahyaabadi
347fcf9f67 fix: avoid reruns when the timestamp method is used (#977) 2023-01-14 17:17:36 -03:00
Andrey Nering
fce7575b03 Add README entry for #982 2023-01-14 16:48:04 -03:00
Pete Davison
2da7ddc399 chore: optimize task filtering (#982) 2023-01-14 16:45:52 -03:00
Pete Davison
1c1be683ab feat: set and shopt directives (#929)
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2023-01-14 16:41:56 -03:00
Andrey Nering
4be1050234 Optimize the Taskfile a bit
`go list ./...` takes quite a few seconds to run. Let's restrict it to the
tasks that actually use it.
2023-01-06 21:41:18 -03:00
Andrey Nering
2efb3533ec Add CHANGELOG + improvements to #980
Closes #978
2023-01-06 21:39:57 -03:00
Lea Anthony
aa6c7e4b94 Add support for 'platforms' in both task and command (#980) 2023-01-06 21:38:35 -03:00
Andrey Nering
63c50d13ee Website/README: Add link to the Mastodon account 2023-01-01 21:24:16 -03:00
Andrey Nering
c1e127e42f Website: Update outdated URL 2022-12-31 14:28:37 -03:00
dependabot[bot]
9e38e8a4db build(deps): bump json5 from 2.2.1 to 2.2.2 in /docs (#972)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-31 14:15:20 -03:00
Andrey Nering
b4c95d6b0b v3.19.1 2022-12-31 14:03:55 -03:00
Pete Davison
c4766e2611 fix: add missing nil check (#971)
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2022-12-31 13:54:26 -03:00
Pete Davison
796097e3ab fix: watch interval (#970) 2022-12-31 13:48:49 -03:00
Pete Davison
c7d9efebf9 Merge pull request #967 from go-task/gha-issue-closed
feat: add action for when an issue is closed
2022-12-23 16:34:40 -06:00
Pete Davison
8f4306d321 feat: add action for when an issue is closed 2022-12-23 22:31:02 +00:00
Pete Davison
435f086cb7 Merge pull request #965 from go-task/fix-interval-schema
fix: incorrect schema type for interval
2022-12-22 18:36:15 -06:00
Pete Davison
01c9158120 fix: incorrect schema type for interval
- Fixes #962
2022-12-23 00:34:08 +00:00
Andrey Nering
e235d77d64 Add CHANGELOG to #964 2022-12-22 21:27:19 -03:00
Henrique Corrêa
dbe8131b75 Close Taskfile after reading it (#964)
This should fix issues preventing modifications to the Taskfile while tasks are still running, like switching git branches for example.

See #963.
2022-12-22 21:23:17 -03:00
Pete Davison
0a9d76515e Merge pull request #957 from go-task/faq
FAQ doc
2022-12-19 19:58:06 +00:00
Pete Davison
0ce1af9ee0 WIP: FAQ doc 2022-12-19 19:51:22 +00:00
Andrey Nering
c4452d2698 Website > Installation: Document official Homebrew go-task package 2022-12-18 22:41:42 -03:00
Pete Davison
491888f6c0 feat: improve unmarshal error handling and use v3 yaml interface everywhere (#959) 2022-12-18 22:11:31 -03:00
Pete Davison
e4158dc5e4 feat: add local-prefixes flag to goimports linter (#958) 2022-12-18 22:06:09 -03:00
Andrey Nering
0307ca8ac6 Website: Upgrade Docusaurus (#956) 2022-12-17 11:43:43 -03:00
Andrey Nering
156a273351 go.mod: Pin released v3.6.0 version of mvdan/sh 2022-12-17 11:18:23 -03:00
Andrey Nering
d6d51a2f8b Prevent TestFileWatcherInterval from running on CI
This test can fail intermittently. It's fine to run it only locally.

We were already doing this for TestSignalSentToProcessGroup.
2022-12-17 11:08:41 -03:00
Andrey Nering
a98b41d657 Add goimports as a linter 2022-12-17 11:02:17 -03:00
Andrey Nering
87ec78fbaa Cleanup: Remove duplicated internal/sleepit/main.go file 2022-12-17 11:01:54 -03:00
Andrey Nering
957bff4b89 CHANGELOG + small improvements to #936 2022-12-17 10:35:30 -03:00
David Alpert
321f7b59d8 Add --json flag to be used by editor extensions (#936) 2022-12-17 10:31:00 -03:00
Andrey Nering
41a9316523 Website: Update "Donate" page + FUNDING.yml 2022-12-07 21:33:49 -03:00
Andrey Nering
1072ff5950 v3.19.0 2022-12-05 22:28:15 -03:00
Andrey Nering
983f6fff5d Upgrade @go-task/go-npm to support pnpm 2022-12-05 22:24:10 -03:00
Pete Davison
b3627fcb18 Run Taskfiles from sub/child directories (#920) 2022-12-05 21:58:20 -03:00
Pete Davison
99d7338c29 feat: add task-level dotenv support (#904) 2022-12-05 21:25:16 -03:00
Andrey Nering
9cf930454d Add CHANGELOG entry for #492, #493 2022-12-05 20:56:47 -03:00
Andrey Nering
4b4962e8c6 Merge pull request #943 from go-task/fix-interpolation-in-includes
fix: interpolate includes taskfile and dir
2022-12-05 20:54:04 -03:00
Andrey Nering
f2afa77114 Website: Update Community > JSON Schema section 2022-11-27 19:50:05 -03:00
Andrey Nering
3aa647c89b Website: Update Chinese translation link label 2022-11-27 19:49:07 -03:00
Andrey Nering
45ab4dc718 Website: Link to the Chinese translation
Closes #921
2022-11-26 18:24:31 -03:00
Andrey Nering
d1850e8fd2 Add Gold Sponsors section 2022-11-24 13:05:24 -03:00
Pete Davison
f1d516cf2a fix: interpolate includes taskfile and dir 2022-11-23 17:58:08 +00:00
Andrey Nering
d55282b53c Merge pull request #934 from go-task/dependabot/npm_and_yarn/docs/loader-utils-2.0.4
Bump loader-utils from 2.0.3 to 2.0.4 in /docs
2022-11-19 22:41:44 -03:00
Andrey Nering
ef9f7af0c5 Merge pull request #938 from rrrix/jetbrains-json-schema-validator-workaround
JetBrains JSON Schema Validator Error Workaround
2022-11-19 22:15:01 -03:00
Rick Bowen
8823887bb4 JetBrains JSON Schema Validator Error Workaround
`schema.json` Workaround for these two JetBrains issues:

- [IDEA-236928 json schema: False positive "Schema validation: Validates to more than one variant" with "oneOf"](https://youtrack.jetbrains.com/issue/IDEA-236928)
- [IDEA-265710 JSON schema validation fails if anyOf is nested in oneOf](https://youtrack.jetbrains.com/issue/IDEA-265710)

There is no material effect on the actual schema validation, as the `oneOf`/`allOf` evaluates only one list entry.

`allOf([1])` is `1`, and `oneOf([1])` is also `1`.

Fixes #847
2022-11-17 16:22:51 -08:00
Andrey Nering
593980e45a Upgrade @go-task/go-npm 2022-11-17 21:04:53 -03:00
dependabot[bot]
081dc16312 Bump loader-utils from 2.0.3 to 2.0.4 in /docs
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-16 05:26:21 +00:00
Andrey Nering
35599af04b v3.18.0 2022-11-12 13:36:52 -03:00
Andrey Nering
a74b35379e Merge pull request #932 from go-task/dependabot/go_modules/github.com/mattn/go-zglob-0.0.4
Bump github.com/mattn/go-zglob from 0.0.3 to 0.0.4
2022-11-12 13:13:04 -03:00
dependabot[bot]
7d16c9f68d Bump github.com/mattn/go-zglob from 0.0.3 to 0.0.4
Bumps [github.com/mattn/go-zglob](https://github.com/mattn/go-zglob) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/mattn/go-zglob/releases)
- [Commits](https://github.com/mattn/go-zglob/compare/v0.0.3...v0.0.4)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-zglob
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-12 16:09:23 +00:00
Andrey Nering
890759cc5f Add CHANGELOG entry for #919 2022-11-12 10:19:11 -03:00
Andrey Nering
e710e2cc5d Merge pull request #919 from go-task/include-alises-in-list-when-silent
feat: include aliases in --list --silent output
2022-11-12 10:16:38 -03:00
Andrey Nering
d787faece4 Improve docs/Taskfile.yml 2022-11-12 09:26:35 -03:00
Andrey Nering
9702109ea9 Merge pull request #927 from go-task/dependabot/npm_and_yarn/docs/loader-utils-2.0.3
Bump loader-utils from 2.0.2 to 2.0.3 in /docs
2022-11-09 10:07:47 -03:00
dependabot[bot]
e547829505 Bump loader-utils from 2.0.2 to 2.0.3 in /docs
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 07:32:40 +00:00
Pete Davison
a664a26062 Merge pull request #890 from go-task/task-list-filtering
refactor: implement task list filtering
2022-11-02 14:49:06 +00:00
Pete Davison
fa105a8a93 refactor: implement task list filtering 2022-11-02 14:42:59 +00:00
Andrey Nering
3a0c7a8c36 Add CHANGELOG for #815
Closes #661
2022-11-02 11:39:05 -03:00
Andrey Nering
13f4b376e8 Merge pull request #815 from pd93/default-included-task
feat: run default task in included file when task is omitted
2022-11-02 11:34:19 -03:00
Pete Davison
5a08409a27 feat: run default task in included file when task is omitted 2022-11-02 14:27:15 +00:00
Andrey Nering
9bbdac3c2e Merge pull request #914 from go-task/update-contribution-guide
chore: add schema info to contribution guide
2022-11-02 11:22:19 -03:00
Andrey Nering
a990ffe53d Refactor: Use early return 2022-11-02 10:23:19 -03:00
Pete Davison
3a4b347d50 feat: include aliases in --list --silent output 2022-10-31 17:19:27 +00:00
Pete Davison
b80e1e4a43 chore: add schema info to contribution guide 2022-10-29 16:04:23 +00:00
Andrey Nering
fd71dfda6a Move docs/schema.json to docs/static/schema.json 2022-10-29 11:59:42 -03:00
Andrey Nering
fdbcbd395d Merge pull request #895 from Eun/add-arm-vx-builds
fix: add armv5 & armv7 builds
2022-10-29 11:57:46 -03:00
Andrey Nering
dba964b559 Merge pull request #910 from go-task/bring-schema-in-house
Bring schema in house
2022-10-29 11:54:08 -03:00
Andrey Nering
8e0816a09d Merge pull request #901 from go-task/github-actions-labels
feat: add actions to auto label issues
2022-10-29 11:52:37 -03:00
Andrey Nering
405b79f86c Merge pull request #902 from trim21/patch-1
make powershell completion works to fill task name
2022-10-29 11:46:45 -03:00
Pete Davison
620e6955e5 chore: update schema/docs to match
- Also reorder them both to match the struct definitions. This makes it easier to compare them
2022-10-29 14:45:32 +00:00
Pete Davison
a4997dd54d feat: copy schema as defined in schemastore 2022-10-29 14:43:47 +00:00
Andrey Nering
3efa9ac8c3 Documentation: Small adjustments to #906 2022-10-29 11:41:05 -03:00
Andrey Nering
fdd52d74e9 Merge pull request #906 from viconnex/add-completion-documentation
Document completion installation
2022-10-29 11:37:58 -03:00
Andrey Nering
ac81dea3ec Merge pull request #912 from go-task/dependabot/go_modules/github.com/stretchr/testify-1.8.1
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
2022-10-29 11:23:06 -03:00
dependabot[bot]
549c37ef87 Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-29 11:03:18 +00:00
Victor Lebrun
6a369ee31c Document completion installation 2022-10-25 21:00:00 +02:00
Trim21
2e573d37ae Update task.ps1 2022-10-18 00:09:07 +08:00
Trim21
394afe2633 Update task.ps1 2022-10-17 23:52:56 +08:00
Tobias Salzmann
99ed3001f0 revert changes, add fix for arm downloads 2022-10-17 09:25:26 +02:00
Pete Davison
9e4cab2af9 feat: add actions to auto label issues 2022-10-15 17:47:39 +00:00
Andrey Nering
33b6927b79 v3.17.0 2022-10-14 21:11:48 -03:00
Andrey Nering
852a176e1f PR Template: Fix content 2022-10-14 21:08:53 -03:00
Andrey Nering
7511249514 GitHub: Attempt to fix PR template 2022-10-14 21:08:07 -03:00
Andrey Nering
3429cdd8af GitHub: Giving up on fancy templates (sigh)
GitHub is was not showing them and I have no idea why.
2022-10-14 21:05:03 -03:00
Andrey Nering
a1cd8eafd8 GitHub: Yet another attempt to fix issue templates 2022-10-14 20:58:31 -03:00
Andrey Nering
fbfb4ba9c4 GitHub: Attempt to fix issue templates 2022-10-14 20:55:46 -03:00
Andrey Nering
ba9ba63792 GitHub: Improving our issue & PR templates 2022-10-14 20:47:09 -03:00
Andrey Nering
460b89ce51 Merge branch 'feat/suggest-similar-task' 2022-10-14 20:08:00 -03:00
Andrey Nering
a4ec6e5257 Improve test #887 2022-10-14 19:50:43 -03:00
Andrey Nering
44aa2ee3b3 Add CHANGELOG and improvements to #887 2022-10-14 19:48:45 -03:00
Andrey Nering
80b417c4ab Merge pull request #887 from ronaudinho/fix/yaml-error-msg
Add file path to YAML error message
2022-10-14 19:36:58 -03:00
Andrey Nering
6d90c781c9 Merge pull request #879 from go-task/aliases
Aliases
2022-10-14 19:32:04 -03:00
Andrey Nering
c51f04eca8 Add some alises to our own Taskfiles 2022-10-14 19:28:27 -03:00
Andrey Nering
dda2004753 --list: Print aliases on its own column 2022-10-14 19:28:05 -03:00
Andrey Nering
297f9eccea For include aliases, consider the main task name as well 2022-10-14 19:27:20 -03:00
Andrey Nering
d2f2cba6d8 Merge branch 'master' into aliases 2022-10-14 18:44:56 -03:00
Andrey Nering
172d71435a Add CHANGELOG for #897 2022-10-14 18:32:12 -03:00
Andrey Nering
bb1aec8a7e Merge pull request #897 from mymmrac/improve-fish-completion
Improved fish shell completions
2022-10-14 18:31:19 -03:00
Artem Yadelskyi
476d9f5e70 Improved fish shell completions 2022-10-15 00:24:11 +03:00
Andrey Nering
99014ad38d Small adjustments + CHANGELOG for #865 2022-10-14 16:51:14 -03:00
Andrey Nering
403456d3dc Merge pull request #865 from ilewin/configurable_watch_interval_#813
Configurable watch interval #813
2022-10-14 16:26:13 -03:00
Andrey Nering
6335878317 Merge pull request #896 from go-task/ignore-fleet-settings
Ignore fleet configuration directory
2022-10-13 12:35:40 -03:00
Pete Davison
6bff658af0 chore: ignore fleet configuration directory 2022-10-13 14:37:52 +00:00
Tobias Salzmann
b111e7bd12 add armv5 & armv7 builds 2022-10-13 11:49:13 +02:00
Max Pushkarov
3e5ee2332a feat: suggest the most similar task name when a given task does not exist 2022-10-10 13:17:19 +03:00
Pete Davison
66f6998c86 docs: update changelog 2022-10-07 11:11:45 +00:00
Pete Davison
f2a8f8ad8f docs: update usage and api reference 2022-10-07 11:11:45 +00:00
Pete Davison
540f6ecfdb tests: update alias test to cover namespace aliases 2022-10-07 11:11:45 +00:00
Pete Davison
8ec89f1bbd refactor: use x/exp/slices instead of custom contains function 2022-10-07 11:11:14 +00:00
Pete Davison
d33906b6e4 fix: deep copy included tasks 2022-10-07 11:11:14 +00:00
Pete Davison
bb79fa1dc3 feat: namespace aliases 2022-10-07 11:11:14 +00:00
Pete Davison
376a6182eb feat: aliases
feat: add aliases to --list and --list-all flags

feat: add aliases to --summary

feat: enable aliases for included tasks

tests: added alias unit tests
2022-10-07 11:11:14 +00:00
ronaudinho
81de61d8db Add file path to YAML error message 2022-10-07 10:18:53 +00:00
Pete Davison
d2061ec898 Merge pull request #874 from go-task/845-colorize-output
Colorize --list, --list-all and --summary output
2022-10-07 11:05:48 +01:00
Pete Davison
077efbd2e7 Add CHANGELOG for #874 2022-10-07 10:01:54 +00:00
Pete Davison
8ce1782380 feat: add coloured output to --list, --list-all and --summary flags
feat: add coloured output to --list and --list-all

feat: add coloured output to --summary

chore: update colors

refactor: better consistency in writer calls in printTasks

feat: subtasks are printed green in --summary
2022-10-07 09:54:17 +00:00
ilewin
c2f20465ab Updated test for file watcher interval param
Updated Interval Setting Priority
2022-10-07 08:56:13 +02:00
Andrey Nering
fb0e43989d Add CHANGELOG for #877 2022-10-06 22:46:59 -03:00
Andrey Nering
754248395c Merge pull request #877 from biozz/master
Fix task names for `--list` and `--list-all`
2022-10-06 22:44:40 -03:00
Andrey Nering
6e975ca155 Merge pull request #882 from go-task/contribution-guide
Add a contributions guide
2022-10-06 22:38:44 -03:00
Pete Davison
79a2bc404e draft: add a contributions guide 2022-10-07 01:21:49 +00:00
Andrey Nering
42a26e1741 Revert "Website: Update Open Graph image"
This reverts commit b16e705a6c.
2022-10-06 22:03:55 -03:00
Andrey Nering
695711e124 Merge pull request #881 from danquah/document-sources-generate-status
Clearify that sources/generate and status can be used together
2022-10-06 21:27:16 -03:00
Mads H. Danquah
0d5811e502 docs: Add paragraphs about how to use generates/sources + status 2022-10-03 13:00:14 +00:00
Ivan Elfimov
b9d070f76b Fix test related to task lables 2022-09-30 19:17:04 +04:00
Ivan Elfimov
122c3f083e Fix task names for --list and --list-all
Task names should not be overrided by `label`.
2022-09-30 19:02:50 +04:00
Andrey Nering
5d22cf4327 v3.16.0 2022-09-29 22:01:16 -03:00
Andrey Nering
219d3ad193 Website: Fix link to file 2022-09-29 21:38:26 -03:00
Andrey Nering
e72157e26a Merge pull request #871 from go-task/release-to-npm
Add package.json to allow users to install Task using npm
2022-09-29 21:34:39 -03:00
Andrey Nering
50a377a7c4 Add package.json to allow users to install Task using npm
Closes #870
2022-09-29 21:27:30 -03:00
Andrey Nering
9d7ddff60c README: Add more links 2022-09-29 13:33:20 -03:00
Andrey Nering
081d878f86 Website > Installation: Update Arch Linux installation method
Package and maintainer changed. See #869.
2022-09-20 13:05:18 -03:00
ilewin
d8dc091267 Merge branch 'go-task:master' into configurable_watch_interval_#813 2022-09-19 20:22:26 +02:00
ilewin
1c44d8049a Issue 813. Made watch interval configurable through global setting in Taskfile and through CLI arg.
Separated Taskfile param and Arg flag
2022-09-19 20:14:35 +02:00
Andrey Nering
a95191d29e Website: Improve syntax highlighting 2022-09-17 13:51:54 -03:00
Andrey Nering
111f6e7f18 Add CHANGELOG entry and API documentation for #818 2022-09-17 13:11:16 -03:00
Andrey Nering
4a5c1e9ec4 Merge branch 'internal-tasks' of https://github.com/pd93/task into pd93-internal-tasks 2022-09-17 12:59:19 -03:00
Andrey Nering
8f0893b5f7 Website: Adjustments to Carbon 2022-09-17 11:11:02 -03:00
Andrey Nering
b16e705a6c Website: Update Open Graph image 2022-09-15 11:17:01 -03:00
Andrey Nering
3cad318b70 v3.15.2
I pushed v3.15.1 tagged in a commit in a detached branch by mistake.

Repushing as v3.15.2
2022-09-08 21:26:18 -03:00
Andrey Nering
8c6002cae6 v3.15.1 2022-09-08 21:22:19 -03:00
Andrey Nering
0355bbaf3b Merge pull request #861 from cdaguerre/feat/make-zsh-completion-configurable
Make zsh completion list configurable
2022-09-08 21:01:04 -03:00
Andrey Nering
2ba083a650 Merge pull request #863 from MarioSchwalbe/bash-completion
Fix handling of CLI_ARGS
2022-09-08 20:59:16 -03:00
Andrey Nering
c79ea5a257 Merge pull request #866 from pd93/fix-read-dotenv
fix: ignore empty dotfile file names
2022-09-08 20:58:25 -03:00
Pete Davison
44706f4957 fix: ignore empty dotfile file names 2022-09-08 18:51:39 +00:00
Mario Schwalbe
a1b3bb03ed * Fix handling of CLI_ARGS 2022-09-08 19:03:29 +02:00
Christian Daguerre
76caa16909 Make zsh completion list configurable 2022-09-07 10:33:55 +02:00
Andrey Nering
160b788198 Merge pull request #859 from jfhovinne/docs-reprobuilds
Document how to reproduce release binaries
2022-09-05 14:29:42 -03:00
jfhovinne
eada62f62c Document how to reproduce executables 2022-09-05 19:08:37 +02:00
Andrey Nering
bd9419e6db Website: Use "Roboto" as the main font
This is to add consistency between different operating systems, specially
Windows which used "Segoe UI" before this commit.
2022-09-04 17:38:29 -03:00
Andrey Nering
bdd9de3001 CHANGELOG: Add extra link 2022-09-03 18:28:24 -03:00
Andrey Nering
200ba4ed04 v3.15.0 2022-09-03 18:21:40 -03:00
Andrey Nering
1e8939dd58 Merge pull request #857 from go-task/feature/add-dir-special-variables
Add ROOT_DIR and TASKFILE_DIR special variables
2022-09-03 18:18:43 -03:00
Andrey Nering
f45dd11e53 Add ROOT_DIR and TASKFILE_DIR special variables
Closes #215
2022-09-03 18:14:54 -03:00
Andrey Nering
1a0cc1d64d Update favicon.ico 2022-08-31 13:21:43 -03:00
Wes McNamee
421cb522d9 Merge pull request #846 from rootulp/patch-1
fix: grammar in docs
2022-08-24 22:07:23 -07:00
Rootul Patel
1b18b041d6 fix: grammar in docs 2022-08-24 20:30:21 -04:00
Andrey Nering
8788703ac6 CHANGELOG for #831
Closes #826
2022-08-23 18:43:04 -03:00
Andrey Nering
b6c25e3ad9 Mention #844 on CHANGELOG 2022-08-23 18:40:34 -03:00
Andrey Nering
73eaa68cd1 Merge pull request #844 from MarioSchwalbe/bash-completion
Use --silent to get the list of tasks (bash completion)
2022-08-23 18:39:47 -03:00
Andrey Nering
beb927f7b4 Merge pull request #831 from ilewin/check_path_for_symlinks_issue_826
Attempt to fix Task not following symlinks
2022-08-23 18:38:17 -03:00
ilewin
cdc969cd4e Added test to check if symlinks are evaluated for task source files 2022-08-23 18:36:19 +02:00
ilewin
2a67499f12 Issue #826. Replaced zglob.Glob func with GlobFollowSymlinks to evaluate symlinks 2022-08-23 18:25:11 +02:00
Mario Schwalbe
6a3cc79daa * Use --silent to get list of tasks 2022-08-23 18:03:15 +02:00
Andrey Nering
97d4a947ee Merge pull request #838 from pcgeek86/patch-1
Update releasing.md
2022-08-17 20:50:18 -03:00
Wes McNamee
e0e47ad9a0 Merge pull request #841 from cristaloleg/fix-linter
Fix go-critic suggestions
2022-08-17 12:38:12 -07:00
Oleg Kovalov
b08eac58e9 Fix go-critic suggestions 2022-08-17 19:37:58 +02:00
Pete Davison
11409ccf21 fix: list + silent flags shouldn't display internal tasks 2022-08-16 17:07:05 +00:00
Pete Davison
e3b6c97c3b fix: the merged task should be internal if the task OR the taskfile are internal 2022-08-16 17:07:05 +00:00
Pete Davison
d3da086ebf docs: added usage 2022-08-16 17:07:05 +00:00
Pete Davison
3507fa40f1 feat: add internal to included files 2022-08-16 17:07:05 +00:00
Pete Davison
6f8f1f1409 feat(task): tasks can be internal (not accessible from cli) 2022-08-16 17:06:25 +00:00
Trevor Sullivan
c2148a359d Update releasing.md 2022-08-16 04:33:54 -06:00
Andrey Nering
c172185a24 Update CHANGELOG 2022-08-15 09:55:11 -03:00
Andrey Nering
1140a5c4ae Merge pull request #835 from MarioSchwalbe/bash-completion
Improved bash completion
2022-08-15 09:52:07 -03:00
Mario Schwalbe
3cc378c960 * Convert indentation to 2 spaces 2022-08-13 21:55:35 +02:00
Andrey Nering
9b3a961303 Merge pull request #832 from jfhovinne/reprobuilds
Modify goreleaser defaults for reproducible builds
2022-08-13 12:04:27 -03:00
Mario Schwalbe
d048555149 Improved bash completion for task 2022-08-11 20:48:41 +02:00
jfhovinne
7533858a52 Modify goreleaser defaults for reproducible builds 2022-08-10 15:33:17 +02:00
Andrey Nering
c4e10ef0aa Refactor: Add SmartJoin to handle IsAbs automatically 2022-08-06 18:19:07 -03:00
Andrey Nering
c20842e7cd v3.14.1: Add CHANGELOG to website 2022-08-03 22:26:39 -03:00
Andrey Nering
6cfdb21313 v3.14.1 2022-08-03 22:08:17 -03:00
Bevan Arps
e396f4d06f Resolve relative include paths relative to the including Taskfile
Closes #823
Closes #822
2022-08-03 21:59:17 -03:00
Andrey Nering
47c1bb6a5b Merge pull request #816 from go-task/dependabot/npm_and_yarn/docs/terser-5.14.2
Bump terser from 5.13.1 to 5.14.2 in /docs
2022-08-03 21:00:52 -03:00
Andrey Nering
adfb0b513e Merge pull request #827 from go-task/go-1-19
Upgrade to Go v1.19
2022-08-03 21:00:44 -03:00
Andrey Nering
98d78b9d8a Upgrade to Go v1.19 2022-08-03 20:58:06 -03:00
Wes McNamee
a1c32a56ea Merge pull request #817 from white-gecko/patch-1
Resolve contradiction.
2022-07-27 23:36:25 -07:00
Natanael Arndt
6584bcf87f Resolve contradiction. 2022-07-21 14:30:51 +02:00
dependabot[bot]
7ac75af622 Bump terser from 5.13.1 to 5.14.2 in /docs
Bumps [terser](https://github.com/terser/terser) from 5.13.1 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 05:16:51 +00:00
Andrey Nering
b3c283b282 Merge pull request #814 from abner-chenc/master
go.mod: update to current golang.org/x/sys revision
2022-07-18 10:30:57 -03:00
Guoqi Chen
c2615dd746 go.mod: update to current golang.org/x/sys revision
go get -d golang.org/x/sys@c0bba94af5f85fbad9f6dc2e04ed5b8fac9696cf
go mod tidy

This brings in linux/loong64 support.
2022-07-18 10:11:48 +08:00
Andrey Nering
789518f70d Merge pull request #811 from go-task/imgbot
[ImgBot] Optimize images
2022-07-16 23:28:31 -03:00
ImgBotApp
ad3008d855 [ImgBot] Optimize images
*Total -- 61.47kb -> 34.61kb (43.69%)

/docs/static/img/pix.png -- 12.63kb -> 1.25kb (90.13%)
/docs/static/img/logo.png -- 21.79kb -> 13.21kb (39.38%)
/docs/static/img/og-image.png -- 26.26kb -> 19.38kb (26.2%)
/docs/static/img/logo.svg -- 0.44kb -> 0.42kb (2.47%)
/docs/static/img/logo_mono.svg -- 0.36kb -> 0.35kb (1.37%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2022-07-17 02:23:22 +00:00
Andrey Nering
3da426603f Website: Improve "Install Script" documentation
Add note about common installation paths.

Closes #775
2022-07-16 22:55:57 -03:00
Andrey Nering
8d26e34b0a Use --list-all to PowerShell completion + Add CHANGELOG to #803 2022-07-16 22:07:24 -03:00
Andrey Nering
110d1d7245 Merge pull request #803 from carlsmedstad/zsh-completion
Fix Zsh completion for tasks without description
2022-07-16 21:38:50 -03:00
Andrey Nering
f7384623df Merge pull request #802 from nokome/patch-1
Update api_reference.md
2022-07-16 21:37:19 -03:00
Carl Smedstad
5d24e166ab Fix Zsh completion for tasks without description
Use --list-all instead of --list in order include tasks without
description in the auto-completion.
2022-07-10 01:52:38 +02:00
Andrey Nering
d9ec5bcd24 v3.14.0 2022-07-08 15:19:32 -03:00
Andrey Nering
bf9cd7625b Refactor task.Setup(): Move to its own file and split in separated functions 2022-07-08 15:16:04 -03:00
Andrey Nering
afbf98c974 Website: Add ENV section to API page 2022-07-08 14:49:52 -03:00
Andrey Nering
fedb68cde7 Allow override the .task dir location with the TASK_TEMP_DIR env 2022-07-08 14:40:10 -03:00
Nokome Bentley
f787937a30 Update api_reference.md
Using `cmd` (singular) with a single string is valid syntax also.
2022-07-08 14:01:41 +12:00
Alexander Mancevice
f54fef7e7b Allow users to override colors using environment variables
Closes #568
Closes #792
2022-07-06 11:46:59 -03:00
Andrey Nering
e36c77aaf3 Fix bug with STDOUT and STDERR in the "group" output mode
Took the oportunity to refactor a bit how we handle closing of the streams.

Fixes #779
2022-07-06 10:45:07 -03:00
Andrey Nering
de45e48c37 Release ARM binaries to Snap. Deprecate i386
Actually done here: https://github.com/go-task/snap/blob/master/snap/snapcraft.yaml

Closes #795
2022-07-04 11:50:36 -03:00
Andrey Nering
ef0ce8224e Merge pull request #797 from go-task/dependabot/go_modules/github.com/stretchr/testify-1.8.0
Bump github.com/stretchr/testify from 1.7.2 to 1.8.0
2022-07-04 11:18:25 -03:00
Andrey Nering
5b4d5387bf Website: Link to Twitter account 2022-07-04 11:14:20 -03:00
Andrey Nering
5c460b38c9 Website: Add more entries to the Community page 2022-07-04 10:50:03 -03:00
Andrey Nering
8b836ab446 CHANGELOG: Mention #769 forggoten on SIGINT entry 2022-07-04 10:44:17 -03:00
dependabot[bot]
1be1fccc76 Bump github.com/stretchr/testify from 1.7.2 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 13:41:49 +00:00
Andrey Nering
2c1fda97f0 Upgrade mvdan.cc/sh, which fixes a bug with associative arrays
Fixes #785
2022-07-04 10:40:25 -03:00
Andrey Nering
71f7b719b5 Merge pull request #791 from MPLew-is/patch-1
Correct `method: timestamp` example block in usage docs
2022-06-27 17:52:18 -03:00
Andrey Nering
e39006b511 Merge pull request #790 from Trim21/patch-2
docs: scoop extra bucket is not required anymore
2022-06-27 17:51:17 -03:00
Mike Lewis
37d07d415a Correct method: timestamp example block
The text above this block currently references a `timestamp` method for checking if a task should be run, then the example uses `checksum` instead.
2022-06-27 14:06:25 -06:00
Trim21
b80c8f78fc extra bucket is not required anymore 2022-06-28 03:22:32 +08:00
Andrey Nering
7707179b93 Merge pull request #783 from ssbarnea/fix/gha-group
Fix GHA grouping examples
2022-06-21 18:08:47 -03:00
Sorin Sbarnea
4e7d8bacdb Fix GHA grouping examples
Our example was not using the correct syntax required for grouping
command output on GHA.
2022-06-21 17:40:11 +01:00
Andrey Nering
0c46fa5a56 Website: Fix typo 2022-06-17 10:05:11 -03:00
Andrey Nering
36aca00de3 Website: Update link 2022-06-15 14:33:15 -03:00
Andrey Nering
0ec8cf1b53 Hide signals tests behind a build tag
Testing signals requires additional executables to be available in the $PATH
and can intermittently fail as well.

Add a build tag, which means these specific tests will only run when requested.

Closes #780
2022-06-15 10:06:38 -03:00
Andrey Nering
4b2b713e59 v3.13.0 2022-06-13 21:08:26 -03:00
Andrey Nering
cc0afce237 Add CHANGELOG entry for #777 2022-06-13 21:02:57 -03:00
Andrey Nering
620f3fc919 Merge pull request #777 from ascheman/feature/776-add-n-for-dry-run
Add `-n` as short cut for `--dry` - solves #776
2022-06-13 21:00:41 -03:00
Andrey Nering
af949ef0dd Restore @sisp work on SVG logos
This was unintentionally lost on the website migration from Docsify to
Docusaurus.

Ref #725
Ref #726
Closes #772

Co-authored by: Sigurd Spieckermann <sigurd.spieckermann@gmail.com>
2022-06-13 20:41:15 -03:00
Gerd Aschemann
475c5dc19a Add -n as short cut for --dry - solves #776 2022-06-13 12:47:03 +02:00
Andrey Nering
71cfe2364a Website: Add a decent Open Graph image 2022-06-12 17:33:40 -03:00
Andrey Nering
c1466f8aca Merge pull request #769 from go-task/fix-signals
Fix behavior of interrupt (SIGINT, SIGTERM) signals
2022-06-11 23:01:51 -03:00
Andrey Nering
7989f73f06 Fix behavior of interrupt (SIGINT, SIGTERM) signals
Task will now give time for the processes running to do cleanup work

Ref #458
Ref #479
Fixes #728

Co-authored-by: Marco Molteni <marco.molteni@pix4d.com>
Co-authored-by: aliculPix4D <aleksandar.licul_ext@pix4d.com>
2022-06-11 22:43:22 -03:00
Andrey Nering
c9a582fbcc Add CHANGELOG, documentation and make small adjutsment for #755 2022-06-11 20:01:48 -03:00
Andrey Nering
63aad1e501 Merge pull request #755 from BrunoDelor/feature/carry-error-code
Add --exit-code (-x) flag to enable carrying error codes from task cmds
2022-06-11 19:53:24 -03:00
Andrey Nering
16ba12239c Website: Installation: Fix markdown 2022-06-11 19:17:29 -03:00
Andrey Nering
b00ae9256b docs/Taskfile.yml: Allow to change server port 2022-06-11 19:16:11 -03:00
Andrey Nering
936045e01c Merge pull request #767 from mefuller/patch-1
Add Fedora Linux to installation
2022-06-11 19:10:37 -03:00
Andrey Nering
b1570ab117 Merge pull request #766 from go-task/dependabot/go_modules/github.com/stretchr/testify-1.7.2
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
2022-06-11 19:04:38 -03:00
Mark E Fuller
f066e3b1e0 Add Fedora Linux to installation
Added Task to Fedora official repositories
2022-06-11 17:31:25 +03:00
dependabot[bot]
1487c0e51b Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-11 11:04:02 +00:00
Andrey Nering
9f244b9bd9 Merge pull request #765 from lhuang61/master
Fix typo
2022-06-10 10:11:57 -03:00
Andrey Nering
374ec27ab5 Merge pull request #759 from Cornul11/patch-1
fixed grammatical errors
2022-06-10 10:11:34 -03:00
Andrey Nering
b222c34f12 Website: Rename Logo.png -> logo.png 2022-06-10 10:05:30 -03:00
Andrey Nering
007a096632 Website: Adjustment on Algolia Search 2022-06-10 10:03:37 -03:00
Andrey Nering
26e02e3773 Website: Attemp to fix og:image meta tag 2022-06-10 09:52:18 -03:00
Andrey Nering
b8668ca3ce Website: Enable search powered by Algolia
https://docusaurus.io/docs/search#using-algolia-docsearch
2022-06-10 09:49:26 -03:00
Lei Huang
21a2f9f93b Fix typo 2022-06-10 17:18:37 +10:00
Dan
8a74141e4b fixed grammatical errors 2022-06-07 16:06:52 +02:00
Bruno Delor
752d9d5316 Renames option to align with existing tools
Shorthand: -x
Longhand: --exit-code
2022-06-06 09:46:27 +02:00
Bruno Delor
58c7cc5d05 Adds test TestErrorCode 2022-06-02 16:44:23 +02:00
Bruno Delor
a790fb7afe Adds --carry flag to enable carrying error codes from task cmds 2022-06-02 14:22:00 +02:00
Andrey Nering
5836cb1728 Website: Add link to GitHub Sponsors 2022-06-01 22:57:50 -03:00
Andrey Nering
19fd219409 Update FUNDING.yml 2022-06-01 22:37:38 -03:00
Andrey Nering
43f99e0bf7 Merge pull request #750 from go-task/api-reference
taskfile.dev: Add page with API Reference
2022-05-31 18:40:06 -03:00
Andrey Nering
6f83f6c1b5 taskfile.dev: Add page with API Reference 2022-05-31 18:36:59 -03:00
Andrey Nering
3f9c177d76 Goreleaser / GitHub Actions: Update committer 2022-05-31 18:22:56 -03:00
Andrey Nering
55dd7e20a0 Merge pull request #747 from go-task/yaml.v3
go.mod: Upgrade to gopkg.in/yaml.v3
2022-05-29 20:21:47 -03:00
Andrey Nering
bfbf29b78f go.mod: Upgrade to gopkg.in/yaml.v3 2022-05-29 20:14:42 -03:00
Andrey Nering
1b6d421a5b Fix missing https://taskfile.dev/install.sh
Fixes #746
2022-05-29 18:58:23 -03:00
Andrey Nering
112d9c4086 README: Fix logo path 2022-05-29 14:36:27 -03:00
Andrey Nering
adb089dc78 Merge pull request #745 from go-task/migrate-to-docusaurus
Migrate website to Docusaurus
2022-05-29 14:32:01 -03:00
Andrey Nering
5024d270ec Migrate website to Docusaurus
https://docusaurus.io/
2022-05-29 14:29:40 -03:00
Andrey Nering
f4d5abfc5b Merge pull request #743 from go-task/dependabot/go_modules/mvdan.cc/sh/v3-3.5.1
Bump mvdan.cc/sh/v3 from 3.5.0 to 3.5.1
2022-05-27 15:31:18 -03:00
dependabot[bot]
f55cf3ab8d Bump mvdan.cc/sh/v3 from 3.5.0 to 3.5.1
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.5.0...v3.5.1)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-27 18:24:08 +00:00
Andrey Nering
d35141a369 Fix link to Discord server
I didn't know links to Discord servers had an expiration time 🤦

This one is unlimited.

Ref #742
2022-05-25 09:41:53 -03:00
Andrey Nering
d450444596 Temporarily revert #479 2022-05-22 16:54:35 -03:00
Andrey Nering
7e11815409 Merge pull request #737 from abrahammurciano/patch-1
Mention how label affects rerunning of tasks
2022-05-22 16:13:04 -03:00
Andrey Nering
017cd4cd6c Merge pull request #738 from carlsmedstad/bash-completion
Make progname easier to configure in task.{bash,fish}
2022-05-22 16:11:24 -03:00
Carl Smedstad
ac6c2ff769 Make progname easier to configur in task.fish 2022-05-22 16:52:53 +02:00
Carl Smedstad
c4e8ca4b32 Enable fish tab completion for tasks without description 2022-05-22 16:50:47 +02:00
Carl Smedstad
c9aec2f281 Make progname easier to configure in task.bash
As task is a very generic name that conflicts with for example
taskwarrior, some packagers might choose to change it. See my package in
the AUR: https://aur.archlinux.org/packages/go-task.

This change makes it easier to configure the name for downstream
packagers.
2022-05-22 16:16:52 +02:00
Carl Smedstad
591561f657 Address shellcheck warnings in task.bash 2022-05-22 16:15:15 +02:00
Carl Smedstad
2ad4054133 Add extension sh & bash to .editorconfig 2022-05-22 16:14:04 +02:00
Abraham Murciano
7883977a56 Mention how label affects rerunning of tasks 2022-05-22 00:03:22 +03:00
Andrey Nering
d5cb842db2 Merge pull request #733 from wyfo/patch-1
Fix interactive task example
2022-05-19 10:46:47 -03:00
Joseph Perez
03bbb0571e Fix interactive task example
A task name is missing in the example.
2022-05-19 09:17:55 +02:00
Andrey Nering
1d355d74ef Merge pull request #729 from go-task/add-staticcheck
Add golangci-lint
2022-05-16 09:34:14 -03:00
Andrey Nering
7f9913590e taskfile.dev: Fix some Docsify plugins not working
Only the Carbon plugin needs to be defined before the `window.$docsify`
declaration. Some others have to be after that to work correctly
(namely search and tabs).
2022-05-15 22:16:06 -03:00
Andrey Nering
9e1d4e7855 Add golangci-lint
https://golangci-lint.run/
2022-05-15 21:30:07 -03:00
Andrey Nering
a1f9b584dc Remove unneeded log on test 2022-05-14 19:50:15 -03:00
Andrey Nering
7d474db765 Make signal test work both locally and in CI 2022-05-14 19:36:15 -03:00
aliculPix4D
367c0b38a6 fix: remove redundant newline (linter error) 2022-05-13 17:36:52 -07:00
Marco Molteni
cacd57f72b fix ci test breakage (fork/exec ./bin/task: no such file or directory)
On Github actions, the destination path of "go install" ($GOPATH/bin) is not
in $PATH, thus the error.
For the life of me I could not understand how to change the $PATH environment
variable in an Actions workflow, so I encode the full path of the just-built
task executable in the tests, which probably was the right thing to do since
the beginning.
2022-05-13 17:36:52 -07:00
Marco Molteni
22dfc1e265 execext.RunCommand: fix: do not pass a cancellable context to mvdan.cc/sh
We used to pass to mvdan.cc/sh/interp.Runner a context that was cancelled on
reception of a OS signal. This caused the Runner to terminate the subprocess
abruptly.

The correct behavior instead is for us to completely ignore the signal and let
the subprocess deal with it. If the subprocess doesn't handle the signal, it
will be terminated. If the subprocess does handle the signal, it knows better
than us wether it wants to cleanup and terminate or do something different.

So now we pass an empty context just to make the API of interp.Runner happy

Fixes go-task/task/#458
2022-05-13 17:36:52 -07:00
Marco Molteni
bffb6e1a07 add regression test for SIGINT behavior
See go-task/task/#458

Helper (sleepit) and test code based on https://github.com/marco-m/timeit
2022-05-13 17:36:52 -07:00
Andrey Nering
cdff0c60d9 Merge pull request #727 from go-task/dependabot/go_modules/mvdan.cc/sh/v3-3.5.0
Bump mvdan.cc/sh/v3 from 3.4.3 to 3.5.0
2022-05-11 23:08:09 -03:00
dependabot[bot]
f55eb3cba9 Bump mvdan.cc/sh/v3 from 3.4.3 to 3.5.0
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.4.3 to 3.5.0.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.4.3...v3.5.0)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-12 02:02:57 +00:00
Andrey Nering
6b8d4dd101 taskfile.dev: Add link to Discord server 2022-05-11 22:50:54 -03:00
Andrey Nering
d05e130250 taskfile.dev: Add Carbon 2022-05-11 22:15:41 -03:00
Andrey Nering
d33e50f367 Merge pull request #726 from sisp/logo-mono
Add monochromatic SVG logo
2022-05-11 20:48:47 -03:00
Sigurd Spieckermann
f3c9c53b6c Add monochromatic SVG logo 2022-05-11 16:12:10 +02:00
Andrey Nering
7d5b9c78b1 Merge pull request #725 from sisp/logo
Clean up SVG logo markup
2022-05-11 09:46:26 -03:00
Sigurd Spieckermann
e6a4b7bbba Clean up SVG logo markup 2022-05-11 14:31:28 +02:00
Andrey Nering
ad0b269d53 v3.12.1 2022-05-10 18:00:45 -03:00
Andrey Nering
5472570958 Add docs/Logo.svg 2022-05-09 13:03:19 -03:00
Andrey Nering
4576ba4db0 Website: Add GA manually for now
Docsify GA plugin seems to be broken:

- https://github.com/docsifyjs/docsify/issues/1695
- https://github.com/docsifyjs/docsify/pull/1702
2022-05-09 11:06:47 -03:00
Andrey Nering
efcfab0955 Website: Re-add GA 2022-05-09 09:54:22 -03:00
Andrey Nering
1acd59c7d6 Replace \r\n on Windows as we do for \n on Linux
Closes #717
2022-05-08 17:37:24 -03:00
Andrey Nering
4951a2bf7a Merge pull request #718 from budimanjojo/master
Fix broken completion when no taskfile is found
2022-05-08 17:25:11 -03:00
budimanjojo
95fc26d4ad Fix broken completion when no taskfile is found 2022-05-07 23:20:08 +07:00
Andrey Nering
b65935d6cf Merge pull request #695 from joshuatz/typo-fixes
Docs: typo fixes
2022-04-01 08:44:06 -03:00
Joshua Tzucker
2155fdd756 Docs: typo fixes 2022-03-31 22:14:38 -07:00
Andrey Nering
f2abc13ce2 v3.12.0 2022-03-31 21:44:59 -03:00
Andrey Nering
0f4621fb02 CHANGELOG: Add entry for #691 2022-03-31 21:40:16 -03:00
Andrey Nering
c6ff641f6d Merge branch 'list-task-names' of https://github.com/ardnew/task into ardnew-list-task-names 2022-03-31 21:31:56 -03:00
Andrey Nering
350f74a53d CHANGELOG: Add entry for #656 2022-03-31 21:19:16 -03:00
Andrey Nering
41cd7acc87 Merge pull request #656 from tylermmorton/master
Add support for multi-level includes
2022-03-31 21:12:15 -03:00
Andrey Nering
c6eea26660 go mod tidy 2022-03-21 15:26:41 -03:00
Andrey Nering
61c5718663 Upgrade to Go 1.18 is out. Set 1.17 as the minimal version 2022-03-21 15:23:06 -03:00
ardnew
9897f4b527 refactor with support for --list and --list-all 2022-03-21 12:59:25 -05:00
ardnew
978a6e5ecb quickly print task names only with flags --silent and --list 2022-03-21 12:02:56 -05:00
Andrey Nering
a018997ddc CHANGELOG: Fix typo 2022-03-21 10:31:48 -03:00
Andrey Nering
de09843467 Improvements + CHANGELOG for #677 2022-03-19 18:41:03 -03:00
Andrey Nering
78a57fdb4b Merge branch 'dballweg/vars_in_includedtaskfile' of https://github.com/dballweg/task into dballweg-dballweg/vars_in_includedtaskfile 2022-03-19 17:31:11 -03:00
Andrey Nering
0bc2fd72f0 Merge pull request #689 from go-task/dependabot/go_modules/github.com/stretchr/testify-1.7.1
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
2022-03-19 11:01:09 -03:00
dependabot[bot]
dda5164efd Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-19 11:07:08 +00:00
Andrey Nering
3df2396b63 Merge pull request #688 from vicmattos/vicmattosissue-683-docs-install-choco
Add chocolatey in installation documentation
2022-03-18 20:46:50 -03:00
Victor Mattos
d3da84e724 docs: add ownership of choco installation method 2022-03-18 17:41:34 -03:00
Victor Mattos
eb61015477 fix: reference chocolatey link anchor
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2022-03-18 17:38:29 -03:00
Victor Mattos
40c644f006 docs: add chocolatey installation method
Resolves #683
2022-03-09 15:39:54 -03:00
Andrey Nering
c9aa0180a8 Merge pull request #679 from philpennock/zsh-completion
completion: zsh: overhaul and sync to current flags
2022-02-27 16:01:11 -03:00
Phil Pennock
a06e46885d completion: zsh: overhaul and sync to current flags
* List all current option flags
* Provide descriptions for every flag
* Pass the `task -l` descriptions as descriptions for the task completions
  + The prior logic had 4 invocations of sed and 1 of awk, and only kept the
    task name
  + Do all filtering in zsh without forking (except for `task` itself)
* When `--taskfile` is used, complete tasks from _that_ file
  + And otherwise, enable completions if only the `.dist` variant files are
    present
* Ensure mutually exclusive options preclude each other
  + the `+ '(groupname)'` clause defines this
* Fix `--dir` to take directories, not files
2022-02-25 01:07:43 -05:00
Dan Ballweg
60fa6e6c0a update 2022-02-24 13:18:35 -06:00
Dan Ballweg
2f18f7927d test include variables 2022-02-24 13:17:20 -06:00
Dan Ballweg
292cf75836 add vars to included taskfiles 2022-02-23 16:53:46 -06:00
tylermmorton
fc95061f4c Add missing newlines 2022-02-21 15:33:54 -05:00
tylermmorton
1f1275255c Fix bug in includes where default taskfiles were not being checked. 2022-02-21 15:31:55 -05:00
Andrey Nering
d8555e5a5d v3.11.0 2022-02-19 19:40:29 -03:00
Andrey Nering
b323531dd5 Improvements and CHANGELOG for #651 2022-02-19 19:31:27 -03:00
Andrey Nering
cfb665310e Merge branch 'group-begin-message' of https://github.com/janslow/task into janslow-group-begin-message 2022-02-19 18:42:34 -03:00
Andrey Nering
51c6ebcd4d Add tests, documentation and changelog for #666 2022-02-19 18:24:43 -03:00
Andrey Nering
e94d1b6b9f Merge branch 'task-498-taskfile-dist' of https://github.com/tylermmorton/task into tylermmorton-task-498-taskfile-dist 2022-02-19 18:01:00 -03:00
Andrey Nering
ca7b32105d Merge pull request #674 from go-task/dependabot/go_modules/mvdan.cc/sh/v3-3.4.3
Bump mvdan.cc/sh/v3 from 3.4.2 to 3.4.3
2022-02-19 17:55:30 -03:00
dependabot[bot]
264db2737b Bump mvdan.cc/sh/v3 from 3.4.2 to 3.4.3
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.4.2 to 3.4.3.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.4.2...v3.4.3)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-19 20:51:22 +00:00
Andrey Nering
5f2c9a6e45 Merge pull request #671 from JessThrysoee/bashcompletion
bash-completion refactoring
2022-02-13 19:51:40 -03:00
Jess Thrysoee
19be1f1bf0 bash-completion refactoring
1. 'compgen -c' lists _all_ command names on the system, which is not
   appropriate for this script, furthermore echo does not read from stdin
   so the output is lost.

2. use _get_comp_words_by_ref and __ltrim_colon_completions to handle task
   names with colons.

   "...modifying COMP_WORDBREAKS in your completion script is not safe
   (as it is a global variable and it has the side effect of affecting
   the behavior of other completion scripts"
   Ref.: https://stackoverflow.com/a/12495727/7044304

3. Add options completion

4. Use task --list-all
2022-02-13 23:44:04 +01:00
tylermmorton
7cdf0000d9 Fix error message assertion in task_test 2022-02-03 22:23:01 -05:00
tylermmorton
13606e5e00 Remove note about multi level includes from usage documentation 2022-02-03 22:20:49 -05:00
tylermmorton
35af240faa Add newlines to multi-level test Taskfiles 2022-02-03 22:19:07 -05:00
tylermmorton
0ac56f8973 Add newlines to test Taskfiles 2022-02-03 22:13:43 -05:00
tylermmorton
6e5f8b1fb0 Append task prefix to log messages 2022-02-03 22:12:58 -05:00
tylermmorton
15e831c0b0 Revert "Update docs to account for new feature"
This reverts commit 66748ab5e5.
2022-02-03 22:09:57 -05:00
tylermmorton
248952bc8f Add dist fallbacks to defaultTaskfiles 2022-01-29 11:53:36 -05:00
Andrey Nering
2373743eac Merge pull request #652 from jcwillox/master
Add completions to nfpms packages
2022-01-17 10:18:22 -03:00
Andrey Nering
f119596be6 Docs: Small change to title 2022-01-17 09:38:32 -03:00
Andrey Nering
b7cb41b388 Merge pull request #657 from lechuckroh/intellij-plugin
Update 'community.md' to add IntelliJ plugin link
2022-01-17 09:37:06 -03:00
Lechuck Roh
a65ee26446 Update 'community.md' to add IntelliJ plugin link 2022-01-16 22:24:12 +09:00
tylermmorton
d3e2fbf1e2 Merge branch 'master' of https://github.com/tylermmorton/task 2022-01-15 23:37:40 -05:00
tylermmorton
66748ab5e5 Update docs to account for new feature 2022-01-15 23:37:39 -05:00
tylermmorton
c73a2c8f84 Move circular include logic to a separate function 2022-01-15 23:34:59 -05:00
Tyler Morton
4bbcd99b8b Merge branch 'go-task:master' into master 2022-01-14 22:39:27 -05:00
tylermmorton
02e7ff27c7 Add support for multi-level includes and cyclic include detection 2022-01-14 22:38:37 -05:00
Josh Willox
7ed3cea40b Add completions to nfpms packages 2022-01-14 20:48:28 +11:00
Jay Anslow
74f5cf8f29 Add support for begin/end messages with grouped output
Fixes #647

This allows CI systems that support grouping (such as with [GitHub Actions's `::group::` command](https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#grouping-log-lines) and [Azure Devops](https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash#formatting-commands)) to collapse all of the logs for a single task, to improve readability of logs

## Example

The following Taskfile

```
# Taskfile.yml
version: 3
output:
  group:
    begin: "::group::{{ .TASK }}"
    end: "::endgroup::"
tasks:
  default:
    cmds:
      - "echo 'Hello, World!'"
```

Results in the following output
```bash
$ task
task: [default] echo 'Hello, World!'
::group::default
Hello, World!
::endgroup::
```

See [this GitHub Actions job](https://github.com/janslow/task/runs/4811059609?check_suite_focus=true) for a full example

<img width="771" alt="image" src="https://user-images.githubusercontent.com/1253367/149429832-6cb0c1b5-0758-442e-9375-c4daa65771bc.png">
<img width="394" alt="image" src="https://user-images.githubusercontent.com/1253367/149429851-1d5d2ab5-9095-4795-9b57-f91750720d40.png">
2022-01-14 00:22:14 +00:00
Andrey Nering
086d13ca2f Docs: Remove line reference from file link 2022-01-13 10:39:38 -03:00
Andrey Nering
2780e96179 Merge pull request #648 from sagikazarmark/docs-nix-install
docs: add nix as an installation method
2022-01-13 10:38:49 -03:00
Mark Sagi-Kazar
191678f9d6 docs: add nix as an installation method 2022-01-13 00:15:04 +01:00
Andrey Nering
79f595d8d1 v3.10.0 2022-01-04 18:19:48 -03:00
Andrey Nering
db2865fb17 Add CHANGELOG entry for #579 2022-01-04 18:10:24 -03:00
Andrey Nering
f945fa60d9 Merge branch 'bugfix/issue-481-dynamic-vars-broken' of https://github.com/masaushi/task into masaushi-bugfix/issue-481-dynamic-vars-broken 2022-01-04 17:39:14 -03:00
Andrey Nering
454988f657 Fix typo 🤦 2022-01-04 17:19:38 -03:00
Andrey Nering
7e0346d6eb Add CHANGELOG, documentation and small improvements to #401 2022-01-04 17:16:21 -03:00
Andrey Nering
00a90d1fe6 Merge branch 'f/list-all' of https://github.com/therealkevinard/task into therealkevinard-f/list-all 2022-01-04 17:03:12 -03:00
Andrey Nering
d6c185580a Add CHANGELOG, documentation and small improvements to #626 2022-01-04 16:56:13 -03:00
Jacob McCollum
fd9132c15d remove extra file 2022-01-03 13:22:06 -05:00
Kevin Ard
42702e81b3 refactor: wrap PrintTasksHelp with arg-less signatures
provide exported methods for accessing PrintTasksHelp variants.
2022-01-03 12:12:18 -05:00
Jacob McCollum
09c9d55695 Changes from PR Review:
- Remove ^task syntax from `defer`
- Support task call syntax in defer
2022-01-02 16:38:06 -05:00
Jacob McCollum
69e9effc88 initial pass at deferred commands 2022-01-02 15:55:43 -05:00
Andrey Nering
1c782c599f Remove deprecated "$" and "^" prefixes
`$` was a variable prefix that make it being evaluated as shell. It was
replaced with `sh:`.

`^` is a command prefix that make it run another task. It was replaced
with `task:`.

These were added long ago when we were experimenting with stuff and kept for
some time for backward compatibility reasons, but sometimes causes confusion
and I think the time to remove the code came.

Closes #644
Closes #645
Ref #642

Co-authored-by: Trite <60318513+Trite8Q1@users.noreply.github.com>
2022-01-02 15:26:42 -03:00
Andrey Nering
ed37071fd6 Merge pull request #621 from kerma/feat/support-yaml
Add support for yaml extension
2022-01-02 15:08:50 -03:00
Margus Kerma
d73cf106b1 Merge branch 'master' into feat/support-yaml 2022-01-02 15:30:23 +02:00
Margus Kerma
1d7982e80a fix(#584): Add support to yaml extension
- init creates Taskfile.yaml
- add changelog entry
- add zsh completion support for Taskfile.yaml
2022-01-02 15:23:10 +02:00
Andrey Nering
d5d1984116 Pin released vetsion of mvdan/sh v3.4.2 2021-12-30 16:45:08 -03:00
Andrey Nering
9eda1629bb Merge pull request #636 from nichady/replace-ioutil
replace usages of ioutil with io and os
2021-12-20 23:58:23 -03:00
nichady
9a5d49774e replace usages of ioutil with io and os 2021-12-20 20:00:34 -06:00
Andrey Nering
b2efebce96 Merge pull request #634 from go-task/upgrade-github-actions
Upgrade GitHub actions
2021-12-19 22:14:23 -03:00
Andrey Nering
85232bd704 Upgrade GitHub actions
Closes #633
2021-12-19 22:06:51 -03:00
Andrey Nering
df4e3aea79 v3.9.2 2021-12-02 09:48:30 -03:00
Andrey Nering
290d45fd05 Upgrade mvdan.cc/sh 2021-12-02 09:45:34 -03:00
Andrey Nering
168e8c925c CHANGELOG: Fix typo 2021-11-29 12:55:43 -03:00
Andrey Nering
d9859b18fe v3.9.1 2021-11-28 16:19:30 -03:00
Andrey Nering
784847f35b CHANGELOG: Add entry for #533 and #588 2021-11-28 16:16:12 -03:00
Andrey Nering
97287377d1 CHANGELOG: Add entries for #597 and #598 2021-11-28 16:16:12 -03:00
Andrey Nering
a15b66e003 Merge pull request #588 from jespino/issue-533
Adding task started and task finished in the verbose otput
2021-11-28 16:14:56 -03:00
Andrey Nering
a441b4b90d Merge pull request #598 from sylv-io/fix/false_fail
task: Check context error
2021-11-28 16:10:32 -03:00
Andrey Nering
0dcc1390a6 GitHub: Remove automatic "bug" or "feature" lables in issues 2021-11-28 15:58:41 -03:00
Andrey Nering
01c86636e9 Add CHANGELOG and minor changes to #613 2021-11-28 15:54:49 -03:00
Andrey Nering
846c27d579 Merge pull request #613 from Peter554/fix-quoting-cli-args
Fix quoting of CLI_ARGS
2021-11-28 15:51:03 -03:00
Andrey Nering
db05059b42 CHANGELOG: Add entry for #614 and #612 2021-11-28 15:43:38 -03:00
Andrey Nering
b824328850 Merge pull request #614 from kerma/fix/panic-on-empty-included-cmd
Add nil check for included cmd
2021-11-28 15:41:38 -03:00
Andrey Nering
a8767a2b1a CHANGELOG: Mention mvdan/sh upgrade 2021-11-28 15:38:47 -03:00
Andrey Nering
5e14e7fb70 Merge pull request #615 from go-task/dependabot/go_modules/mvdan.cc/sh/v3-3.4.1
Bump mvdan.cc/sh/v3 from 3.4.0 to 3.4.1
2021-11-27 17:32:22 -03:00
dependabot[bot]
fbaa7be52e Bump mvdan.cc/sh/v3 from 3.4.0 to 3.4.1
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.4.0...v3.4.1)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-27 11:03:48 +00:00
Margus Kerma
b6016b244e fix(#612): Add nil check for included cmd 2021-11-26 11:20:05 +02:00
Peter Byfield
e339a64261 Fix quoting of CLI_ARGS
Consider a task:

test:
  cmds:
    - pytest {{.CLI_ARGS}}

Running `task test -- -m "not foo"` should be equivalent
to running `pytest -m "not foo"`. However, with the current
implementation the quoting of CLI_ARGS is lost and the task
executes `python -m not foo`, which results in an error.
2021-11-25 14:13:45 +01:00
Andrey Nering
17e18442ab Merge pull request #600 from OmriSteiner/typofix
Fix typo in usage.md
2021-11-09 12:15:26 -03:00
Omri Steiner
e8aa3a17a6 Fix typo in usage.md 2021-11-09 16:18:42 +02:00
Marcello Sylvester Bauer
bdb97eab86 task: Check context error
Check context error after running dependencies, to prevent false
negative precondition errors due to "context canceled".

Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
2021-11-05 15:06:51 +01:00
Jesús Espino
690000254c Apply suggestions from code review
Co-authored-by: Andrey Nering <andrey@nering.com.br>
2021-10-31 09:37:23 +01:00
Andrey Nering
6a0b778978 Add CHANGELOG for #592 2021-10-30 11:15:56 -03:00
Andrey Nering
549d141053 Merge pull request #592 from caarlos0/brew
fix: goreleaser brew completions
2021-10-30 11:07:13 -03:00
Carlos A Becker
c31ecdb8de fix: goreleaser brew completions 2021-10-27 14:48:00 -03:00
Jesús Espino
8a09d044c7 Adding task started and task finished in the verbose otput 2021-10-16 21:12:26 +02:00
Andrey Nering
a3b5b89930 Fix typo in CHANGELOG 2021-10-02 18:51:52 -03:00
Andrey Nering
ad6f100f6a v3.9.0 2021-10-02 18:47:30 -03:00
Andrey Nering
3cfe21af58 Add shellQuote template function 2021-10-02 18:29:07 -03:00
Andrey Nering
b70a660975 Add CHANGELOG for #580 2021-10-02 18:07:54 -03:00
Andrey Nering
04c1d1389f go mod tidy 2021-10-02 17:52:02 -03:00
Andrey Nering
f12156bf81 Merge pull request #580 from system-transparency/update/sh
upgrade mvdan.cc/sh/v3 v3.3.1 => v3.4.0
2021-10-02 17:50:37 -03:00
Marcello Sylvester Bauer
0177ac660b upgrade mvdan.cc/sh/v3 v3.3.1 => v3.4.0
Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
2021-10-02 12:33:07 +02:00
Andrey Nering
361b9b4ce4 v3.8.0 2021-09-26 22:30:26 -03:00
Andrey Nering
78792bd11c Add CHANGELOG + Small improvement for #563 2021-09-26 21:55:31 -03:00
Andrey Nering
8b38ddfcd9 Merge pull request #563 from system-transparency/feature/interactive
Task: Add interactive parameter
2021-09-26 21:40:50 -03:00
Andrey Nering
78ddf50d2d Documentation: Remove reference to deprecated "expansions" keyword
Closes #575
2021-09-26 21:28:40 -03:00
masaushi
93dcb20e12 fix error in evaluating dynamic variables with newly created directory 2021-09-26 22:30:32 +09:00
Andrey Nering
41a71e1dee Add CHANGELOG for #573 2021-09-25 09:48:49 -03:00
Andrey Nering
a5ed8ad58c Merge pull request #573 from masaushi/bugfix/issue-534-seg-fault-on-empty-command
Fix segmentation fault on nil slice element for issue #534
2021-09-25 09:46:47 -03:00
Andrey Nering
e45ed85b55 Add CHANGELOG + Small nits for #552 2021-09-25 09:40:03 -03:00
Andrey Nering
52474f9103 Merge pull request #552 from justafish/justafish/519/optional-includes
Allow includes to be optional
2021-09-25 09:36:44 -03:00
Andrey Nering
c2587da27d Merge pull request #577 from go-task/dependabot/go_modules/github.com/fatih/color-1.13.0
Bump github.com/fatih/color from 1.12.0 to 1.13.0
2021-09-25 09:32:28 -03:00
Andrey Nering
26036877b2 Merge pull request #576 from go-task/dependabot/go_modules/github.com/joho/godotenv-1.4.0
Bump github.com/joho/godotenv from 1.3.0 to 1.4.0
2021-09-25 09:31:54 -03:00
dependabot[bot]
906cdd9050 Bump github.com/fatih/color from 1.12.0 to 1.13.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-25 11:04:26 +00:00
dependabot[bot]
762662d056 Bump github.com/joho/godotenv from 1.3.0 to 1.4.0
Bumps [github.com/joho/godotenv](https://github.com/joho/godotenv) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/joho/godotenv/releases)
- [Commits](https://github.com/joho/godotenv/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/joho/godotenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-25 11:04:15 +00:00
masaushi
1de4b38766 fix segmentation fault on nil slice element 2021-09-15 00:01:33 +09:00
Andrey Nering
6c73ab823b Add CHANGELOG + gofmt for #557 2021-09-06 10:30:45 -03:00
Andrey Nering
5ef1651151 Merge branch 'include-homedir' of https://github.com/amancevice/task into amancevice-include-homedir 2021-09-06 10:24:23 -03:00
Alexander Mancevice
8d695bc8d7 simplify logic to expand included paths 2021-09-05 10:57:49 -04:00
Alexander Mancevice
c892d055ed Use internal execext.Expand to expand ~ in includes 2021-09-05 08:18:47 -04:00
Andrey Nering
b327e54be1 Give up on trying to make Gorelease release Homebrew automatically
It refuses to do it and I don't know why. Gonna publish the manifest manually as before
2021-09-04 22:17:41 -03:00
Andrey Nering
989045489c v3.7.3
🙄
2021-09-04 22:06:45 -03:00
Andrey Nering
888338c60e v3.7.2
Attempt to fix Homebrew releasing by Goreleaser
2021-09-04 22:03:22 -03:00
Andrey Nering
e6c6cc7811 v3.7.1 2021-09-04 21:52:46 -03:00
Andrey Nering
fa0e72bd69 Documentation typo
Fixes #555
2021-09-04 21:30:28 -03:00
Andrey Nering
18decac44d Homebrew: Automate with Goreleaser and start publishing M1 binaries 2021-09-04 21:26:17 -03:00
Andrey Nering
1012a0cf2b Upgrade to Go 1.17. Set 1.16 as the minimal version 2021-09-04 21:04:40 -03:00
Andrey Nering
7e4de945cf Merge pull request #564 from JulienBreux/feat/upgrade-goreleaser-action
Upgrade Goreleaser action to v2 - To ensure mac/m1 mac/arm release
2021-09-04 20:56:16 -03:00
Andrey Nering
a468272726 Merge pull request #567 from LukeCarrier/go-1.16
Build with Go 1.16
2021-09-04 20:52:24 -03:00
Luke Carrier
039d8f000d Build with Go 1.16
This enables darwin-arm64 builds to support Apple Silicon-based Macs.
2021-09-04 22:56:39 +01:00
Marcello Sylvester Bauer
2dc181c75e Task: Add interactive parameter
Add the task parameter "interactive" to force interleaved output in order
to make interactive CLI apps work.

Feature request in #217

TODO:
* Update documentation

Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
2021-09-03 10:31:24 +02:00
Julien Breux
d35f960a8a Upgrade Goreleaser action to v2 2021-09-02 17:45:01 +02:00
Andrey Nering
634f8ed574 Merge pull request #562 from notnmeyer/fix-fish-shell-completions
Fix fish completions
2021-09-01 13:34:10 -03:00
Nate Meyer
d369451308 keep the sed, we do want to skip the first line 2021-09-01 08:54:48 -07:00
Nate Meyer
8f1202424d properly format each line 2021-09-01 08:33:08 -07:00
Alexander Mancevice
0a6833e9d8 Allow included Taskfiles to use ~/* paths 2021-08-21 07:20:33 -04:00
Sally Young
8f80fc4e2c Issue #519: Allow includes to be optional 2021-08-11 17:28:44 +01:00
Andrey Nering
50e5813222 Merge pull request #544 from AlexanderBeyn/fix-bash-completion
Fix bash completions when the current argument begins with a dash
2021-08-07 13:54:39 -03:00
Andrey Nering
7bc268aeaa Merge pull request #545 from go-task/dependabot/go_modules/mvdan.cc/sh/v3-3.3.1
Bump mvdan.cc/sh/v3 from 3.3.0 to 3.3.1
2021-08-07 13:53:22 -03:00
dependabot[bot]
537b5b1e25 Bump mvdan.cc/sh/v3 from 3.3.0 to 3.3.1
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: mvdan.cc/sh/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-07 11:03:11 +00:00
Alexander Beyn
aae38f8ce7 Don't let grep treat the search pattern as an option 2021-08-07 02:28:52 -07:00
Andrey Nering
ad05432bcf v3.7.0 2021-07-31 21:36:03 -03:00
Andrey Nering
8aa983257d Small adjustments and CHANGELOG for #359 2021-07-31 20:29:59 -03:00
Andrey Nering
046a97d1e5 go.mod: Upgrade minimal Go version to v1.15 2021-07-31 20:29:19 -03:00
Ross Hammermeister
d28649b13d Refactoring startExecution 2021-07-31 19:36:40 -03:00
Ross Hammermeister
3e16ca37bc Updating version checking 2021-07-31 19:36:40 -03:00
Ross Hammermeister
2da38a5bdc Cleaning up the run code 2021-07-31 19:36:40 -03:00
Ross Hammermeister
bbe1d8b52e Adding proper version checking for taskfile when using run 2021-07-31 19:36:40 -03:00
Ross Hammermeister
97c85e39c3 Only run task once for #53 2021-07-31 19:36:40 -03:00
Andrey Nering
a7b59e5b12 community.md: Update title level 2021-07-23 18:32:13 -03:00
Andrey Nering
9eb1252ce9 Merge pull request #531 from biozz/patch-2
Update community.md about Sublime Text 4 package
2021-07-23 18:30:11 -03:00
Ivan Elfimov
0e01e13670 Update community.md about Sublime Text 4 package
Added a simple abstract about Sublime Text 4 package with the links to the source code and package control.
2021-07-23 23:45:22 +03:00
Andrey Nering
239e61e718 v3.6.0 2021-07-10 23:13:03 -03:00
Andrey Nering
22549e9fd8 CHANGELOG: Fix typo 2021-07-10 22:04:15 -03:00
Andrey Nering
1f9fd24064 Small improvement and CHANGELOG for #477 2021-07-10 21:58:03 -03:00
Andrey Nering
a7594740e3 Merge pull request #477 from mrngsht/sources_evaluation
Evaluate sources also if status is up-to-date
2021-07-10 21:54:47 -03:00
Andrey Nering
945c72cf6c Small optimization and bug fix: don't compute variables if not needed for dotenv:
Closes #517
2021-07-10 19:46:53 -03:00
Andrey Nering
824b0c0132 Improve error message 2021-07-10 19:33:36 -03:00
Andrey Nering
51e9f2f579 Site: Enable search 2021-07-10 19:13:04 -03:00
Andrey Nering
e8ec33d9d0 Site: Return to light theme 2021-07-10 19:07:17 -03:00
Andrey Nering
3bbbaf12fd v3.5.0 2021-07-04 21:53:22 -03:00
Andrey Nering
30ffacd879 Update currency 2021-07-04 21:47:36 -03:00
Andrey Nering
75e9b7791c Remove Patreon
Also, do a few more updates.
2021-07-04 21:45:07 -03:00
Andrey Nering
4b665ab19a Add CHANGELOG entry for 08265ed1d7 2021-06-05 16:04:01 -03:00
Nicolas Fouché
08265ed1d7 Allow vars in dotenv paths, including environment variables
Closes #453
Closes #434
Ref #433

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2021-06-05 16:00:19 -03:00
Andrey Nering
cded9af90f v3.4.3 2021-05-30 23:03:10 -03:00
Andrey Nering
4e1f2ad017 Enforce NO_COLOR=1 on tests to make sure it passes
Closes #459
Fixes #480
Ref #343
Ref fatih/color#137
2021-05-30 22:48:48 -03:00
Andrey Nering
7f92b7072d Merge pull request #496 from go-task/dependabot/go_modules/github.com/fatih/color-1.12.0
Bump github.com/fatih/color from 1.11.0 to 1.12.0
2021-05-30 22:19:21 -03:00
dependabot[bot]
4a589ba6a4 Bump github.com/fatih/color from 1.11.0 to 1.12.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.11.0...v1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-29 11:04:31 +00:00
Andrey Nering
7f16325fcc Merge pull request #491 from go-task/dependabot/go_modules/mvdan.cc/sh/v3-3.3.0
Bump mvdan.cc/sh/v3 from 3.2.4 to 3.3.0
2021-05-22 09:53:20 -03:00
dependabot[bot]
b62e5bf34c Bump mvdan.cc/sh/v3 from 3.2.4 to 3.3.0
Bumps [mvdan.cc/sh/v3](https://github.com/mvdan/sh) from 3.2.4 to 3.3.0.
- [Release notes](https://github.com/mvdan/sh/releases)
- [Changelog](https://github.com/mvdan/sh/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mvdan/sh/compare/v3.2.4...v3.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-22 11:03:11 +00:00
Andrey Nering
bd6b348cc7 Update CHANGELOG 2021-05-20 21:30:13 -03:00
Andrey Nering
62f35fe8c8 Merge pull request #485 from lpdyck/bug/watch-repects-task-dir
Changes --watch to respect task directory
2021-05-20 21:26:43 -03:00
Andrey Nering
cb2cb4659c Merge pull request #490 from per1234/update-setup-task-action
Update docs for new arduino/setup-task action repository
2021-05-20 21:23:42 -03:00
per1234
a2c58415cf Update docs for new arduino/setup-task action repository
The GitHub Actions action for installing Task has graduated from its original home in the experimental `arduino/action`
repository with a move to a dedicated permanent repository at `arduino/setup-task`. This move was accompanied by
significant upgrades to the project infrastructure to facilitate its maintenance and quality assurance.

A 1.0.0 release has been made and a `v1` ref that will track all releases in the major version 1 series. I have updated
the example snippet to use this `v1 ref because this will cause the user's workflows to use stable release versions of
the action while also benefiting from ongoing development to the action at each patch or minor release up until such time
as a new major release is made. At this time the user will be given the opportunity to evaluate whether any changes to
the workflow are required by the breaking change to the action that triggered the major release before manually updating
the major ref in the workflows (e.g., `uses: arduino/setup-task@v2`).
2021-05-20 02:40:09 -07:00
Andrey Nering
2cb9987c99 Merge pull request #489 from go-task/dependabot/go_modules/github.com/fatih/color-1.11.0
Bump github.com/fatih/color from 1.10.0 to 1.11.0
2021-05-17 21:54:18 -03:00
dependabot[bot]
36584cfb7c Bump github.com/fatih/color from 1.10.0 to 1.11.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.10.0...v1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-15 11:03:43 +00:00
Landon Dyck
b825ad6a12 use status.Glob for watch globbing 2021-05-08 15:02:08 -05:00
Andrey Nering
f8545d4c61 v3.4.2 2021-04-23 18:11:31 -03:00
Oleg Butuzov
9b42ef5d46 "file does not exist" improving for watchers
Adds additional (initial missing) context to the go generic
`os.ErrNotExist` error, in addition to other errors that (possibly)
can be returned by `zglob.Glob`

Closes #472
2021-04-23 18:03:49 -03:00
Andrey Nering
05ddfc0495 Merge pull request #476 from Pix4D/fix-os-kill
signals: do not try to catch uncatchable signals
2021-04-23 17:45:56 -03:00
Andrey Nering
53b2cebb66 Updated the version output to use Go module build information if avalable. Enabled GoReleaser module proxying for verifiable builds.
Co-authored-by: Jamie Edge <JamieEdge@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-04-23 17:35:15 -03:00
mrngsht
58c69e36a1 Evaluate sources also if status is up-to-date 2021-04-21 21:56:25 +09:00
Marco Molteni
837fb71a24 signals: do not try to catch uncatchable signals
os.Kill is SIGKILL (kill -9), cannot be intercepted.
(see https://github.com/golang/go/issues/13080)
2021-04-20 14:57:23 +02:00
Marco Molteni
2e13cf5f74 gitignore more editors 2021-04-20 14:54:24 +02:00
Andrey Nering
0ae1681d9c CHANGELOG: Fix typos 2021-04-17 17:57:08 -03:00
Andrey Nering
ebb66ba8fb v3.4.1 2021-04-17 17:48:36 -03:00
Andrey Nering
e79354a039 Revert "Updated the version output to use Go module build information if available. Enabled GoReleaser module proxying for verifiable builds."
This reverts commit 2a3f049336.
2021-04-17 17:47:24 -03:00
Andrey Nering
a57beb1de4 Website: Remove GitHub logo
The website that hosted the SVG file is offline for a while.
2021-04-17 17:34:00 -03:00
Andrey Nering
1648c44ee2 Website: Use dark theme 2021-04-17 17:34:00 -03:00
Andrey Nering
efe47a149e Website: Remove "Examples" page 2021-04-17 17:33:52 -03:00
Andrey Nering
2d66a2f0f3 Improve YAML parse error reporting
Fixes #467
2021-04-17 17:12:39 -03:00
Andrey Nering
43a1f1314e Website: Add a "Community" page 2021-04-17 11:59:24 -03:00
Andrey Nering
4f4b282d7c Merge pull request #471 from go-task/dependabot/go_modules/github.com/stretchr/testify-1.7.0
Bump github.com/stretchr/testify from 1.5.1 to 1.7.0
2021-04-17 10:53:03 -03:00
dependabot[bot]
d3d4da18e5 Bump github.com/stretchr/testify from 1.5.1 to 1.7.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.5.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.5.1...v1.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-17 13:51:37 +00:00
Andrey Nering
b8da583986 Merge pull request #470 from go-task/dependabot/go_modules/github.com/fatih/color-1.10.0
Bump github.com/fatih/color from 1.7.0 to 1.10.0
2021-04-17 10:51:01 -03:00
Andrey Nering
73f6b42715 Merge pull request #469 from go-task/dependabot/go_modules/github.com/radovskyb/watcher-1.0.7
Bump github.com/radovskyb/watcher from 1.0.5 to 1.0.7
2021-04-17 10:50:21 -03:00
dependabot[bot]
0e2a4efdaa Bump github.com/radovskyb/watcher from 1.0.5 to 1.0.7
Bumps [github.com/radovskyb/watcher](https://github.com/radovskyb/watcher) from 1.0.5 to 1.0.7.
- [Release notes](https://github.com/radovskyb/watcher/releases)
- [Commits](https://github.com/radovskyb/watcher/compare/1.0.5...v1.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-17 13:47:39 +00:00
dependabot[bot]
6798e16aaf Bump github.com/fatih/color from 1.7.0 to 1.10.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.7.0 to 1.10.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.7.0...v1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-17 13:47:38 +00:00
Andrey Nering
c9cc64ecfc Merge pull request #468 from go-task/dependabot/go_modules/github.com/mattn/go-zglob-0.0.3
Bump github.com/mattn/go-zglob from 0.0.1 to 0.0.3
2021-04-17 10:46:42 -03:00
dependabot[bot]
761f9045ac Bump github.com/mattn/go-zglob from 0.0.1 to 0.0.3
Bumps [github.com/mattn/go-zglob](https://github.com/mattn/go-zglob) from 0.0.1 to 0.0.3.
- [Release notes](https://github.com/mattn/go-zglob/releases)
- [Commits](https://github.com/mattn/go-zglob/compare/v0.0.1...v0.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-17 13:43:00 +00:00
Andrey Nering
dfae979287 Add .github/dependabot.yml 2021-04-17 10:42:18 -03:00
George Pollard
fe917affd2 Include task name in log output 2021-04-04 16:16:22 -03:00
Andrey Nering
d44207dd7f Merge pull request #463 from JamieEdge/update-install-docs
Update Go modules installation documentation for Go 1.16
2021-04-04 15:48:19 -03:00
Andrey Nering
ec8b1403bd Use early return and add CHANGELOG for #462 2021-04-04 15:40:34 -03:00
Jamie Edge
6f3d108c1e Updated the install script documentation. 2021-04-04 17:31:41 +01:00
Jamie Edge
c34ee9c1f9 Updated the Go modules installation documentation for Go 1.16. 2021-04-04 17:30:42 +01:00
Jamie Edge
2a3f049336 Updated the version output to use Go module build information if available. Enabled GoReleaser module proxying for verifiable builds. 2021-04-04 12:57:58 +01:00
Andrey Nering
0c91011e88 Merge pull request #460 from patrick-mota/patch-1
Fix typo default installation
2021-03-28 11:10:38 -03:00
Andrey Nering
8bcd8719aa Docs: Add GO111MODULE=on to go get command 2021-03-28 10:45:36 -03:00
Ganon
29a8af509b Fix typo default installation 2021-03-26 13:19:45 +01:00
Andrey Nering
d3cd9f17f9 Documentation: Update link 2021-03-20 13:30:38 -03:00
Andrey Nering
b9aea8c5ec v3.3.0 2021-03-20 13:21:00 -03:00
Andrey Nering
897619a961 Upgrade github.com/spf13/pflag to v1.0.5 2021-03-20 12:00:39 -03:00
Andrey Nering
e6c4706b73 Add support for delegating CLI arguments with "--" and a special CLI_ARGS variable
Closes #327
2021-03-20 11:58:45 -03:00
Andrey Nering
8994c50d34 Upgrade mvdan.cc/sh to v3.2.4 2021-03-20 10:38:13 -03:00
Andrey Nering
55b62e47eb Upgrade mvdan.cc/sh to v3.2.2 2021-03-07 15:32:22 -03:00
Ross Hammermeister
c6ecf70377 Adding a --concurrency (-C) flag 2021-03-07 09:49:57 -03:00
Andrey Nering
f0cd7d27fb Taskfile: Set CGO_ENABLED=0 globally
We want that also for running tests, and not only for building it.
2021-03-07 09:30:33 -03:00
Andrey Nering
f923bb499b CHANGELOG: Fix wrong year in release date 2021-02-16 17:53:28 -03:00
Andrey Nering
aa3a29fed2 CHANGELOG: Add missing release dates 2021-02-16 17:52:32 -03:00
Kevin Ard
347c796662 add tests to previous 2020-11-13 16:24:34 -05:00
Kevin Ard
9bed7f7a9b feat (help): allow cli option to list tasks with no desc
added an add'l cli option that lists all tasks, with or without description.
orig. behavior: task -l lists tasks with desc field
new behaviour: task -la or task -a will list all tasks. if task has desc, it will be included.

BREAKING CHANGES: none, that I know of.
NOTES/Concerns:
- This is wip.
- Haven't checked how it interacts with bash completion.
- The new Executor.TaskNames func does not use e.CompiledTask(taskfile.Call{Task: task.Task})
2020-11-13 15:27:03 -05:00
752 changed files with 49916 additions and 5385 deletions

View File

@@ -8,6 +8,6 @@ charset = utf-8
trim_trailing_whitespace = true
indent_style = tab
[*.{md,yml,yaml,json,toml,htm,html}]
[*.{md,mdx,yml,yaml,json,toml,htm,html,js,ts,vue,css,svg,sh,bash,fish}]
indent_style = space
indent_size = 2

4
.gitattributes vendored
View File

@@ -1 +1,5 @@
* text=auto
*.mdx -linguist-detectable
# Keep LF line endings in testdata for consistent checksums across platforms
testdata/** text eol=lf

View File

@@ -1,46 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at andrey.nering@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -1,6 +0,0 @@
* Bug reports and feature requests are welcome in [the issues][issues]
* Pull Requests are welcome. For more complex changes and features it's
recommended to open an issue with the feature request first
* Documentation contributions are as important as code contributions
[issues]: https://github.com/go-task/task/issues

3
.github/FUNDING.yml vendored
View File

@@ -1,3 +0,0 @@
open_collective: task
patreon: andreynering
custom: 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A&currency_code=BRL&source=url'

View File

@@ -1,14 +0,0 @@
---
name: Bug Report
about: Use the template to report bugs and issues
labels: bug
---
- Task version:
- Operating System:
### Example Taskfile showing the issue
```yaml
```

69
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
name: '🐞 Bug Report'
description: Report a bug in Task.
labels: ['state: needs-triage']
body:
- type: markdown
attributes:
value: |
Thanks for your bug report!
Before submitting, please check the list of [existing issues](https://github.com/go-task/task/issues) and make sure the same bug was not already reported by someone else.
- type: textarea
id: description
attributes:
label: Description
description: Describe the bug you're seeing.
placeholder: |
- What did you do?
- What did you expect to happen?
- What happened instead?
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version(s) of Task is the issue occurring on?
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: What operating system(s) is the issue occurring on?
validations:
required: true
- type: dropdown
id: experiments
attributes:
label: Experiments Enabled
description: Do you have any experiments enabled? You can check by running `task --experiments`.
multiple: true
options:
- Env Precedence
- Gentle Force
- Map Variables (1)
- Map Variables (2)
- Remote Taskfiles
validations:
required: false
- type: textarea
id: logs
attributes:
label: Example Taskfile
description: |
If you have a Taskfile that reproduces the issue, please paste it here.
This will be automatically formatted into code, so no need for backticks.
render: YAML
placeholder: |
version: '3'
tasks:
default:
cmds:
- 'echo "This Taskfile is buggy :("'

View File

@@ -1,5 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Questions, Ideas and General Discussions
- name: '🔌 Task for Visual Studio Code'
url: https://github.com/go-task/vscode-task
about: 'Issues related to the Visual Studio Code extension should be opened here.'
- name: '💬 Help forum on Discord'
url: https://discord.com/channels/974121106208354339/1025054680289660989
about: 'The #help channel on our Discord is the best way to get help from the community.'
- name: '❓ Questions, Ideas and General Discussions'
url: https://github.com/go-task/task/discussions
about: Ask questions and discuss general ideas with the community
about: 'Ask questions and discuss general ideas with the community.'

View File

@@ -1,12 +0,0 @@
---
name: Feature Request
about: Use the template to make feature requests
labels: feature
---
Describe in detail what feature do you want to see in Task.
Give examples if possible.
Please, search if this wasn't proposed before, and if this is more like an idea
than a strong feature request, consider opening a
[discussion](https://github.com/go-task/task/discussions) instead.

View File

@@ -0,0 +1,23 @@
name: '✨ Feature Request'
description: Suggest a new feature or enhancement for Task.
labels: ['state: needs-triage']
body:
- type: markdown
attributes:
value: |
Thanks for your feature request!
Before submitting, please check the list of [existing issues](https://github.com/go-task/task/issues) and make sure the same change was not already requested by someone else.
If your request is more of an idea than a feature request, consider opening a [discussion](https://github.com/go-task/task/discussions) instead.
- type: textarea
id: description
attributes:
label: Description
description: Describe the feature/enhancement you want to see in Task.
placeholder: |
- Give a general overview of the feature/enhancement.
- Explain problem is the change trying to solve.
- Give examples of how you would use the feature.
validations:
required: true

11
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,11 @@
<!--
Thanks for your pull request, we really appreciate contributions!
Please understand that it may take some time to be reviewed.
Also, make sure to follow the [Contribution Guide](https://taskfile.dev/contributing/).
-->
- [ ] I have read and followed the [Contribution Guide](https://taskfile.dev/contributing/)

36
.github/renovate.json vendored Normal file
View File

@@ -0,0 +1,36 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"group:allNonMajor",
"schedule:weekly",
":semanticCommitTypeAll(chore)"
],
"mode": "full",
"addLabels":["area: dependencies"],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^\\.github/workflows/.*\\.ya?ml$"],
"matchStrings": [
"uses:\\s*golangci/golangci-lint-action@\\S+\\s+with:\\s+version:\\s*(?<currentValue>v[\\d.]+)"
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "golangci/golangci-lint"
}
],
"packageRules": [
{
"matchManagers": ["github-actions"],
"addLabels": ["area: github actions"]
},
{
"matchCategories": ["js", "node"],
"addLabels": ["lang: javascript"]
},
{
"matchCategories": ["golang"],
"addLabels": ["lang: go"]
}
]
}

View File

@@ -0,0 +1,46 @@
name: issue awaiting response
on:
issue_comment:
types: [created]
permissions:
issues: write
jobs:
issue-awaiting-response:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
})
const comments = await github.paginate(
github.rest.issues.listComments, {
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
}
)
const labels = await github.paginate(
github.rest.issues.listLabelsOnIssue, {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
}
)
if (labels.find(label => label.name === 'state: awaiting response')) {
if (comments[comments.length-1].user?.login === issue.data.user?.login) {
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'state: awaiting response'
})
}
}

32
.github/workflows/issue-closed.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: issue closed
on:
issues:
types: [closed]
permissions:
issues: write
jobs:
issue-closed:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const labels = await github.paginate(
github.rest.issues.listLabelsOnIssue, {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
}
)
if (labels.find(label => label.name === 'state: needs triage')) {
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'state: needs triage'
})
}

126
.github/workflows/issue-experiment.yml vendored Normal file
View File

@@ -0,0 +1,126 @@
name: issue experiment
on:
issues:
types: [field_added]
permissions:
issues: write
jobs:
issue-experiment-proposal:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'proposal'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This issue has been marked as an experiment proposal! :test_tube: It will now enter a period of consultation during which we encourage the community to provide feedback on the proposed design. Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
issue-experiment-draft:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'draft'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This experiment has been marked as a draft! :sparkles: This means that an initial implementation has been added to the latest release of Task! You can find information about this experiment and how to enable it in our [experiments documentation](https://taskfile.dev/experiments). Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
issue-experiment-candidate:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'candidate'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This experiment has been marked as a candidate! :fire: This means that the implementation is nearing completion and we are entering a period for final comments and feedback! You can find information about this experiment and how to enable it in our [experiments documentation](https://taskfile.dev/experiments). Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
issue-experiment-stable:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'stable'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This experiment has been marked as stable! :metal: This means that the implementation is now final and ready to be released. No more changes will be made and the experiment is safe to use in production! You can find information about this experiment and how to enable it in our [experiments documentation](https://taskfile.dev/experiments). Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
issue-experiment-released:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'released'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This experiment has been released! :rocket: This means that it is no longer an experiment and is available in the latest major version of Task. Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
})
issue-experiment-abandoned:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'abandoned'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This experiment has been abandoned. :disappointed: This means that this feature will not be added to Task and any experimental functionality will be removed. Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
})
issue-experiment-superseded:
if: github.event.issue_field.id == '6591' && github.event.issue_field_value.option.name == 'superseded'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This experiment has been superseded. :seedling: This means that another experiment has replaced this one. Please see the [experiment workflow documentation](https://taskfile.dev/experiments#workflow) for more information on how we release experiments.'
})
github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
})

View File

@@ -0,0 +1,32 @@
name: issue needs triage
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
issue-needs-triage:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const labels = await github.paginate(
github.rest.issues.listLabelsOnIssue, {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
}
)
if (labels.length === 0) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['state: needs triage']
})
}

46
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Lint
on:
pull_request:
push:
tags:
- v*
branches:
- main
permissions:
contents: read
jobs:
lint:
name: Lint
strategy:
matrix:
go-version: [1.25.10, 1.26.x]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{matrix.go-version}}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.12.2
lint-jsonschema:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.14
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: install check-jsonschema
run: python -m pip install 'check-jsonschema==0.27.3'
- name: check-jsonschema (metaschema)
run: check-jsonschema --check-metaschema website/src/public/schema.json

69
.github/workflows/pr-build.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
name: PR Build
on:
pull_request_target:
types: [labeled, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'needs-build')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: "1.26.x"
cache: true
- uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7
with:
version: "~> v2"
args: release --snapshot --clean --config .goreleaser-pr.yml
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: task_linux_amd64
path: dist/task_linux_amd64.tar.gz
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: task_linux_arm64
path: dist/task_linux_arm64.tar.gz
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: task_darwin_amd64
path: dist/task_darwin_amd64.tar.gz
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: task_darwin_arm64
path: dist/task_darwin_arm64.tar.gz
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: task_windows_amd64
path: dist/task_windows_amd64.zip
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: checksums
path: dist/task_checksums.txt
- uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
id: find-comment
with:
token: ${{secrets.GITHUB_TOKEN}}
issue-number: ${{ github.event.pull_request.number }}
body-includes: "📦 Build artifacts ready!"
- uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
with:
token: ${{secrets.GITHUB_TOKEN}}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## 📦 Build artifacts ready!
Download binaries from [this workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
Available platforms: Linux, macOS, Windows (amd64, arm64)
edit-mode: replace

34
.github/workflows/release-nightly.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Release nightly
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.26.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7
with:
distribution: goreleaser-pro
version: latest
args: release --clean --nightly -f .goreleaser-nightly.yml
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GORELEASER_KEY: ${{secrets.GORELEASER_KEY}}
CLOUDSMITH_TOKEN: ${{secrets.CLOUDSMITH_TOKEN}}

View File

@@ -3,24 +3,58 @@ name: goreleaser
on:
push:
tags:
- '*'
- "v*"
permissions:
id-token: write # Required for OIDC
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: 1.15.x
go-version: 1.26.x
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Update npm
run: npm install -g npm@latest
- name: Install Task
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2
- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
with:
package_json_file: "website/package.json"
run_install: "true"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7
with:
distribution: goreleaser-pro
version: latest
args: release --rm-dist
args: release --clean --draft
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_GORELEASER_TOKEN: ${{secrets.GH_GORELEASER_TOKEN}}
GORELEASER_KEY: ${{secrets.GORELEASER_KEY}}
CLOUDSMITH_TOKEN: ${{secrets.CLOUDSMITH_TOKEN}}
- name: Deploy Website
shell: bash
run: |
task website:deploy:prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

19
.github/workflows/security.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Security
on:
pull_request:
push:
tags:
- v*
branches:
- main
permissions:
contents: read
jobs:
govulncheck:
name: govulncheck
runs-on: ubuntu-latest
steps:
- uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4

View File

@@ -1,30 +1,33 @@
name: Test
on: [push, pull_request]
on:
pull_request:
push:
tags:
- v*
branches:
- main
permissions:
contents: read
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
go-version: [1.14.x, 1.15.x]
go-version: [1.25.10, 1.26.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.platform}}
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go ${{matrix.go-version}}
uses: actions/setup-go@v1
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{matrix.go-version}}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Download Go modules
run: go mod download
env:
GOPROXY: https://proxy.golang.org
- name: Build
run: go build -o ./bin/task -v ./cmd/task
- name: Test
run: ./bin/task test
run: go run ./cmd/task test

12
.gitignore vendored
View File

@@ -10,6 +10,9 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Graphvis files
*.gv
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/
@@ -19,12 +22,17 @@ dist/
.DS_Store
# intellij idea/goland
# editors
.idea/
.vscode/settings.json
.fleet/
# exuberant ctags
tags
/bin
/bin/*
!/bin/.keep
/testdata/vars/v1
/tmp
node_modules
website/.netlify/

47
.golangci.yml Normal file
View File

@@ -0,0 +1,47 @@
version: "2"
formatters:
enable:
- gofumpt
- goimports
- gci
settings:
gci:
sections:
- standard
- default
- prefix(github.com/go-task)
- localmodule
linters:
enable:
- depguard
- gosec
- mirror
- misspell
- modernize
- noctx
- paralleltest
- thelper
- tparallel
- usetesting
settings:
gosec:
excludes:
- G306
depguard:
rules:
main:
files:
- $all
- '!$test'
- '!**/errors/*.go'
deny:
- pkg: errors
desc: Use github.com/go-task/task/v3/errors instead
exclusions:
presets:
- comments
- common-false-positives
- legacy
- std-error-handling

15
.goreleaser-nightly.yml Normal file
View File

@@ -0,0 +1,15 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
pro: true
release:
name_template: 'v{{.Version}}'
nightly:
publish_release: true
keep_single_release: true
version_template: "{{incminor .Version}}-nightly"
includes:
- from_file:
path: ./.goreleaser.yml

31
.goreleaser-pr.yml Normal file
View File

@@ -0,0 +1,31 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
builds:
- binary: task
main: ./cmd/task
goos: [windows, darwin, linux]
goarch: [amd64, arm64]
env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- "-s -w"
archives:
- name_template: '{{.Binary}}_{{.Os}}_{{.Arch}}'
files:
- README.md
- LICENSE
- completion/**/*
format_overrides:
- goos: windows
formats: [zip]
snapshot:
version_template: 'pr-{{ .ShortCommit }}'
checksum:
name_template: 'task_checksums.txt'

View File

@@ -1,47 +1,176 @@
build:
binary: task
main: cmd/task/task.go
goos:
- windows
- darwin
- linux
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
ignore:
- goos: darwin
goarch: 386
env:
- CGO_ENABLED=0
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
builds:
- binary: task
main: ./cmd/task
goos:
- windows
- darwin
- linux
- freebsd
goarch:
- '386'
- amd64
- arm
- arm64
- riscv64
goarm:
- '6'
ignore:
- goos: darwin
goarch: '386'
- goos: darwin
goarch: riscv64
- goos: windows
goarch: arm
- goos: windows
goarch: riscv64
env:
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- "-s -w"
- "{{if .IsNightly}}-X github.com/go-task/task/v3/internal/version.version={{.Version}}{{end}}"
gomod:
proxy: true
archives:
- name_template: "{{.Binary}}_{{.Os}}_{{.Arch}}"
- name_template: '{{.Binary}}_{{.Os}}_{{.Arch}}'
files:
- README.md
- LICENSE
- completion/**/*
format_overrides:
- goos: windows
format: zip
formats: [zip]
release:
draft: true
git:
ignore_tags:
- "{{if not .IsNightly}}nightly{{end}}"
snapshot:
name_template: "{{.Tag}}"
version_template: '{{.Version}}'
checksum:
name_template: "task_checksums.txt"
name_template: 'task_checksums.txt'
nfpms:
- vendor: Task
homepage: https://github.com/go-task/task
maintainer: Andrey Nering <andrey.nering@gmail.com>
description: Simple task runner written in Go
homepage: https://taskfile.dev
maintainer: The Task authors <task@taskfile.dev>
description: A fast, cross-platform build tool inspired by Make, designed for modern workflows.
section: golang
license: MIT
conflicts:
- taskwarrior
formats:
- deb
- rpm
file_name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
- apk
file_name_template: '{{.ProjectName}}_{{.Version}}_{{.Os}}_{{.Arch}}'
contents:
- src: completion/bash/task.bash
dst: /etc/bash_completion.d/task
- src: completion/fish/task.fish
dst: /usr/share/fish/completions/task.fish
- src: completion/zsh/_task
dst: /usr/local/share/zsh/site-functions/_task
brews:
- name: go-task
description: A fast, cross-platform build tool inspired by Make, designed for modern workflows.
license: MIT
homepage: https://taskfile.dev
directory: Formula
repository:
owner: go-task
name: homebrew-tap
token: "{{.Env.GH_GORELEASER_TOKEN}}" # So that it runs as the task-bot user
test: system "#{bin}/task", "--help"
install: |-
bin.install "task"
bash_completion.install "completion/bash/task.bash" => "task"
zsh_completion.install "completion/zsh/_task" => "_task"
fish_completion.install "completion/fish/task.fish"
commit_author:
name: task-bot
email: 106601941+task-bot@users.noreply.github.com
winget:
- name: Task
publisher: Task
short_description: The modern task runner.
description: A fast, cross-platform build tool inspired by Make, designed for modern workflows.
license: MIT
homepage: https://taskfile.dev/
publisher_url: https://taskfile.dev/
publisher_support_url: https://github.com/go-task/task/issues
package_identifier: Task.Task
commit_author:
name: task-bot
email: 106601941+task-bot@users.noreply.github.com
commit_msg_template: 'chore: release {{.PackageIdentifier}} {{.Tag}}'
release_notes_url: https://github.com/go-task/task/releases/tag/{{.Tag}}
tags:
- build
- build-tool
- devops
- go
- make
- makefile
- runner
- task
- task-runner
- taskfile
- tool
repository:
owner: go-task
name: winget-pkgs
branch: 'task-{{.Version}}'
token: "{{.Env.GH_GORELEASER_TOKEN}}" # So that it runs as the task-bot user
pull_request:
enabled: true
draft: false
check_boxes: true
base:
owner: microsoft
name: winget-pkgs
branch: master
body: |
/cc @andreynering @pd93 @vmaerten
npms:
- name: "@go-task/cli"
repository: "git+https://github.com/go-task/task.git"
bugs: https://github.com/go-task/task/issues
description: A fast, cross-platform build tool inspired by Make, designed for modern workflows.
homepage: https://taskfile.dev
license: MIT
author: "The Task authors"
access: public
keywords:
- "task"
- "taskfile"
- "build-tool"
- "task-runner"
cloudsmiths:
- organization: "task"
repository: "{{if not .IsNightly}}task{{end}}"
formats:
- deb
- rpm
- apk
distributions:
deb:
- "any-distro/any-version"
rpm:
- "any-distro/any-version"
alpine:
- "alpine/any-version"
component: main
republish: true

8
.mockery.yaml Normal file
View File

@@ -0,0 +1,8 @@
all: False
template: testify
filename: '{{base (trimSuffix ".go" .InterfaceFile)}}_mock.go'
packages:
github.com/go-task/task/v3/internal/fingerprint:
interfaces:
SourcesCheckable:
StatusCheckable:

7
.prettierrc.yml Normal file
View File

@@ -0,0 +1,7 @@
trailingComma: none
singleQuote: true
overrides:
- files: "*.md"
options:
printWidth: 80
proseWrap: always

4
.taskrc.yml Normal file
View File

@@ -0,0 +1,4 @@
experiments:
GENTLE_FORCE: 0
REMOTE_TASKFILES: 0
ENV_PRECEDENCE: 0

7
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"recommendations": [
"editorconfig.editorconfig",
"golang.go",
"task.vscode-task"
]
}

14
.vscode/settings-sample.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"yaml.schemas": {
"./website/src/public/schema.json": [
"Taskfile.yml",
"Taskfile.yaml",
"taskfile.yml",
"taskfile.yaml"
]
},
"gopls": {
"formatting.local": "github.com/go-task"
},
"go.formatTool": "gofumpt"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,49 @@
<div align="center">
<a href="https://taskfile.dev">
<img src="docs/Logo.png" width="200px" height="200px" />
<img src="website/src/public/img/logo.svg" width="200px" height="200px" />
</a>
<h1>Task</h1>
<h1>Task: The Modern Task Runner</h1>
<p>
Task is a task runner / build tool that aims to be simpler and easier to use than, for example, <a href="https://www.gnu.org/software/make/">GNU Make<a>.
A fast, cross-platform build tool inspired by Make, designed for modern workflows.
</p>
<p>
See <a href="https://taskfile.dev">taskfile.dev</a> for the documentation.
<a href="https://taskfile.dev/docs/installation">Installation</a> &bullet; <a href="https://taskfile.dev/docs/getting-started">Getting Started</a> &bullet; <a href="https://taskfile.dev/docs/guide">Docs</a> &bullet; <a href="https://twitter.com/taskfiledev">Twitter</a> &bullet; <a href="https://bsky.app/profile/taskfile.dev">Bluesky</a> &bullet; <a href="https://fosstodon.org/@task">Mastodon</a> &bullet; <a href="https://discord.gg/6TY36E39UK">Discord</a>
</p>
<h1>Gold Sponsors</h1>
<table>
<tr>
<td align="center" valign="middle">
<a target="_blank" href="https://devowl.io">
<img src="website/src/public/img/devowl.io.svg" height="100px" width="200px" title="devowl.io" />
</a>
</td>
<td align="center" valign="middle">
<a target="_blank" href="https://goodx.international/">
<img src="website/src/public/img/goodx.svg" height="80px" width="200px" title="GoodX" />
</a>
</td>
<td align="center" valign="middle">
<a target="_blank" href="https://magic.dev/">
<img src="website/src/public/img/magic.png" height="100px" width="200px" title="Magic" />
</a>
</td>
</tr>
</table>
<h2>Community Sponsors</h2>
<table>
<tr>
<td align="center" valign="middle">
<a target="_blank" href="https://cloudsmith.com/">
<img src="website/src/public/img/cloudsmith.svg" height="100px" width="200px" title="Cloudsmith" />
</a>
</td>
</tr>
</table>
</div>

View File

@@ -1,28 +1,77 @@
version: '3'
includes:
docs:
taskfile: ./docs
dir: ./docs
website:
aliases: [w, docs, d]
taskfile: ./website
dir: ./website
vars:
GIT_COMMIT:
sh: git log -n 1 --format=%h
BIN: "{{.ROOT_DIR}}/bin"
GOTESTSUM_FORMAT: '{{if .CI}}github-actions{{else}}pkgname{{end}}'
GO_PACKAGES:
sh: go list ./...
env:
CGO_ENABLED: '0'
tasks:
default:
cmds:
- task: lint
- task: test
run:
desc: Runs Task
cmds:
- go run ./cmd/task {{.CLI_ARGS}}
install:
desc: Installs Task
aliases: [i]
sources:
- './**/*.go'
- go.mod
cmds:
- go install -v -ldflags="-w -s -X main.version={{.GIT_COMMIT}}" ./cmd/task
- go install -v ./cmd/task
generate:
aliases: [gen, g]
desc: Runs all generate tasks
cmds:
- task: generate:mocks
- task: generate:fixtures
generate:mocks:
desc: Runs Mockery to create mocks
aliases: [gen:mocks, g:mocks]
deps: [install:mockery]
sources:
- "internal/fingerprint/checker.go"
generates:
- "internal/mocks/*.go"
cmds:
- find . -type f -name *_mock.go -delete
- "{{.BIN}}/mockery"
generate:fixtures:
desc: Runs tests and generates golden fixture files
aliases: [gen:fixtures, g:fixtures]
env:
CGO_ENABLED: '0'
GOLDIE_UPDATE: 'true'
GOLDIE_TEMPLATE: 'true'
cmds:
- find ./testdata -name '*.golden' -delete
- go test ./...
install:mockery:
desc: Installs mockgen; a tool to generate mock files
vars:
MOCKERY_VERSION: v3.2.2
env:
GOBIN: "{{.BIN}}"
status:
- go version -m {{.BIN}}/mockery | grep github.com/vektra/mockery | grep {{.MOCKERY_VERSION}}
cmds:
- GOBIN="{{.BIN}}" go install github.com/vektra/mockery/v3@{{.MOCKERY_VERSION}}
mod:
desc: Downloads and tidy Go modules
@@ -30,53 +79,155 @@ tasks:
- go mod download
- go mod tidy
cli-deps:
desc: Downloads CLI dependencies
cmds:
- task: go-get
vars: {REPO: golang.org/x/lint/golint}
- task: go-get
vars: {REPO: github.com/goreleaser/goreleaser}
- task: go-get
vars: {REPO: github.com/goreleaser/godownloader}
clean:
desc: Cleans temp files and folders
aliases: [clear]
cmds:
- rm -rf dist/
- rm -rf tmp/
lint:
desc: Runs golint
desc: Runs golangci-lint
aliases: [l]
sources:
- './**/*.go'
- .golangci.yml
- go.mod
cmds:
- golint {{catLines .GO_PACKAGES}}
- golangci-lint run
lint:fix:
desc: Runs golangci-lint and fixes any issues
sources:
- './**/*.go'
- .golangci.yml
- go.mod
cmds:
- golangci-lint run --fix
format:
desc: Runs golangci-lint and formats any Go files
aliases: [fmt, f]
sources:
- './**/*.go'
- .golangci.yml
cmds:
- golangci-lint fmt
sleepit:build:
desc: Builds the sleepit test helper
sources:
- ./cmd/sleepit/**/*.go
generates:
- "{{.BIN}}/sleepit"
cmds:
- go build -o {{.BIN}}/sleepit{{exeExt}} ./cmd/sleepit
sleepit:run:
desc: Builds the sleepit test helper
deps: [sleepit:build]
cmds:
- "{{.BIN}}/sleepit {{.CLI_ARGS}}"
silent: true
test:
desc: Runs test suite
deps: [install]
aliases: [t]
deps: [gotestsum:install]
sources:
- "**/*.go"
- "testdata/**/*"
cmds:
- go test {{catLines .GO_PACKAGES}}
- gotestsum -f '{{.GOTESTSUM_FORMAT}}' ./...
test-release:
test:watch:
desc: Runs test suite with watch tests included
deps: [sleepit:build, gotestsum:install]
cmds:
- gotestsum -f '{{.GOTESTSUM_FORMAT}}' ./... -tags 'watch'
test:all:
desc: Runs test suite with signals and watch tests included
deps: [sleepit:build, gotestsum:install]
cmds:
- gotestsum -f '{{.GOTESTSUM_FORMAT}}' -tags 'signals watch' ./...
goreleaser:test:
desc: Tests release process without publishing
cmds:
- goreleaser --snapshot --rm-dist
- goreleaser --snapshot --clean
gen-install-script:
desc: Generate install script using https://github.com/goreleaser/godownloader
gotestsum:install:
desc: Installs gotestsum
status:
- command -v gotestsum
cmds:
- godownloader --repo go-task/task -o install-task.sh
- cp ./install-task.sh ./docs/install.sh
- go install gotest.tools/gotestsum@latest
ci:
- task: go-get
vars: {REPO: golang.org/x/lint/golint}
- task: lint
- task: test
go-get: go get -u {{.REPO}}
packages:
goreleaser:install:
desc: Installs goreleaser
cmds:
- echo '{{.GO_PACKAGES}}'
silent: true
- go install github.com/goreleaser/goreleaser/v2@latest
gorelease:install:
desc: "Installs gorelease: https://pkg.go.dev/golang.org/x/exp/cmd/gorelease"
status:
- command -v gorelease
cmds:
- go install golang.org/x/exp/cmd/gorelease@latest
api:check:
desc: Checks what changes have been made to the public API
deps: [gorelease:install]
vars:
LATEST:
sh: git describe --tags --abbrev=0
cmds:
- gorelease -base={{.LATEST}}
release:*:
desc: Prepare the project for a new release
summary: |
This task will do the following:
- Update the version and date in the CHANGELOG.md file
- Update the version in the package.json and package-lock.json files
- Copy the latest docs to the "current" version on the website
- Commit the changes
- Create a new tag
- Push the commit/tag to the repository
- Create a GitHub release
To use the task, run "task release:<version>" where "<version>" is is one of:
- "major" - Bumps the major number
- "minor" - Bumps the minor number
- "patch" - Bumps the patch number
- A semver compatible version number (e.g. "1.2.3")
vars:
VERSION:
sh: "go run ./cmd/release --version {{index .MATCH 0}}"
COMPLETE_MESSAGE: |
Creating release with GoReleaser: https://github.com/go-task/task/actions/workflows/release.yml
Please wait for the CI to finish and then do the following:
- Copy the changelog for v{{.VERSION}} to the GitHub release
- Update and push the snapcraft manifest in https://github.com/go-task/snap/blob/main/snap/snapcraft.yaml
preconditions:
- sh: test $(git rev-parse --abbrev-ref HEAD) = "main"
msg: "You must be on the main branch to release"
- sh: "[[ -z $(git diff --shortstat main) ]]"
msg: "You must have a clean working tree to release"
prompt: "Are you sure you want to release version {{.VERSION}}?"
cmds:
- cmd: echo "Releasing v{{.VERSION}}"
silent: true
- "go run ./cmd/release {{.VERSION}}"
- "git add --all"
- "git commit -m v{{.VERSION}}"
- "git push"
- "git tag -a v{{.VERSION}} -m v{{.VERSION}}"
- "git push origin tag v{{.VERSION}}"
- cmd: printf "%s" '{{.COMPLETE_MESSAGE}}'
silent: true

View File

@@ -3,65 +3,54 @@ package args
import (
"strings"
"github.com/go-task/task/v3/taskfile"
"github.com/spf13/pflag"
"mvdan.cc/sh/v3/syntax"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/taskfile/ast"
)
// ParseV3 parses command line argument: tasks and global variables
func ParseV3(args ...string) ([]taskfile.Call, *taskfile.Vars) {
var calls []taskfile.Call
var globals *taskfile.Vars
// Get fetches the remaining arguments after CLI parsing and splits them into
// two groups: the arguments before the double dash (--) and the arguments after
// the double dash.
func Get() ([]string, []string, error) {
args := pflag.Args()
doubleDashPos := pflag.CommandLine.ArgsLenAtDash()
if doubleDashPos == -1 {
return args, nil, nil
}
return args[:doubleDashPos], args[doubleDashPos:], nil
}
// Parse parses command line argument: tasks and global variables
func Parse(args ...string) ([]*task.Call, *ast.Vars) {
calls := []*task.Call{}
globals := ast.NewVars()
for _, arg := range args {
if !strings.Contains(arg, "=") {
calls = append(calls, taskfile.Call{Task: arg})
calls = append(calls, &task.Call{Task: arg})
continue
}
if globals == nil {
globals = &taskfile.Vars{}
}
name, value := splitVar(arg)
globals.Set(name, taskfile.Var{Static: value})
}
if len(calls) == 0 {
calls = append(calls, taskfile.Call{Task: "default"})
globals.Set(name, ast.Var{Value: value})
}
return calls, globals
}
// ParseV2 parses command line argument: tasks and vars of each task
func ParseV2(args ...string) ([]taskfile.Call, *taskfile.Vars) {
var calls []taskfile.Call
var globals *taskfile.Vars
func ToQuotedString(args []string) (string, error) {
var quotedCliArgs []string
for _, arg := range args {
if !strings.Contains(arg, "=") {
calls = append(calls, taskfile.Call{Task: arg})
continue
}
if len(calls) < 1 {
if globals == nil {
globals = &taskfile.Vars{}
}
name, value := splitVar(arg)
globals.Set(name, taskfile.Var{Static: value})
} else {
if calls[len(calls)-1].Vars == nil {
calls[len(calls)-1].Vars = &taskfile.Vars{}
}
name, value := splitVar(arg)
calls[len(calls)-1].Vars.Set(name, taskfile.Var{Static: value})
quotedCliArg, err := syntax.Quote(arg, syntax.LangBash)
if err != nil {
return "", err
}
quotedCliArgs = append(quotedCliArgs, quotedCliArg)
}
if len(calls) == 0 {
calls = append(calls, taskfile.Call{Task: "default"})
}
return calls, globals
return strings.Join(quotedCliArgs, " "), nil
}
func splitVar(s string) (string, string) {

View File

@@ -6,19 +6,22 @@ import (
"github.com/stretchr/testify/assert"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/args"
"github.com/go-task/task/v3/taskfile"
"github.com/go-task/task/v3/taskfile/ast"
)
func TestArgsV3(t *testing.T) {
func TestArgs(t *testing.T) {
t.Parallel()
tests := []struct {
Args []string
ExpectedCalls []taskfile.Call
ExpectedGlobals *taskfile.Vars
ExpectedCalls []*task.Call
ExpectedGlobals *ast.Vars
}{
{
Args: []string{"task-a", "task-b", "task-c"},
ExpectedCalls: []taskfile.Call{
ExpectedCalls: []*task.Call{
{Task: "task-a"},
{Task: "task-b"},
{Task: "task-c"},
@@ -26,179 +29,99 @@ func TestArgsV3(t *testing.T) {
},
{
Args: []string{"task-a", "FOO=bar", "task-b", "task-c", "BAR=baz", "BAZ=foo"},
ExpectedCalls: []taskfile.Call{
ExpectedCalls: []*task.Call{
{Task: "task-a"},
{Task: "task-b"},
{Task: "task-c"},
},
ExpectedGlobals: &taskfile.Vars{
Keys: []string{"FOO", "BAR", "BAZ"},
Mapping: map[string]taskfile.Var{
"FOO": taskfile.Var{Static: "bar"},
"BAR": taskfile.Var{Static: "baz"},
"BAZ": taskfile.Var{Static: "foo"},
ExpectedGlobals: ast.NewVars(
&ast.VarElement{
Key: "FOO",
Value: ast.Var{
Value: "bar",
},
},
},
&ast.VarElement{
Key: "BAR",
Value: ast.Var{
Value: "baz",
},
},
&ast.VarElement{
Key: "BAZ",
Value: ast.Var{
Value: "foo",
},
},
),
},
{
Args: []string{"task-a", "CONTENT=with some spaces"},
ExpectedCalls: []taskfile.Call{
ExpectedCalls: []*task.Call{
{Task: "task-a"},
},
ExpectedGlobals: &taskfile.Vars{
Keys: []string{"CONTENT"},
Mapping: map[string]taskfile.Var{
"CONTENT": taskfile.Var{Static: "with some spaces"},
ExpectedGlobals: ast.NewVars(
&ast.VarElement{
Key: "CONTENT",
Value: ast.Var{
Value: "with some spaces",
},
},
},
),
},
{
Args: []string{"FOO=bar", "task-a", "task-b"},
ExpectedCalls: []taskfile.Call{
ExpectedCalls: []*task.Call{
{Task: "task-a"},
{Task: "task-b"},
},
ExpectedGlobals: &taskfile.Vars{
Keys: []string{"FOO"},
Mapping: map[string]taskfile.Var{
"FOO": {Static: "bar"},
ExpectedGlobals: ast.NewVars(
&ast.VarElement{
Key: "FOO",
Value: ast.Var{
Value: "bar",
},
},
},
),
},
{
Args: nil,
ExpectedCalls: []taskfile.Call{
{Task: "default"},
},
Args: nil,
ExpectedCalls: []*task.Call{},
},
{
Args: []string{},
ExpectedCalls: []taskfile.Call{
{Task: "default"},
},
Args: []string{},
ExpectedCalls: []*task.Call{},
},
{
Args: []string{"FOO=bar", "BAR=baz"},
ExpectedCalls: []taskfile.Call{
{Task: "default"},
},
ExpectedGlobals: &taskfile.Vars{
Keys: []string{"FOO", "BAR"},
Mapping: map[string]taskfile.Var{
"FOO": {Static: "bar"},
"BAR": {Static: "baz"},
Args: []string{"FOO=bar", "BAR=baz"},
ExpectedCalls: []*task.Call{},
ExpectedGlobals: ast.NewVars(
&ast.VarElement{
Key: "FOO",
Value: ast.Var{
Value: "bar",
},
},
},
&ast.VarElement{
Key: "BAR",
Value: ast.Var{
Value: "baz",
},
},
),
},
}
for i, test := range tests {
t.Run(fmt.Sprintf("TestArgs%d", i+1), func(t *testing.T) {
calls, globals := args.ParseV3(test.Args...)
t.Parallel()
calls, globals := args.Parse(test.Args...)
assert.Equal(t, test.ExpectedCalls, calls)
assert.Equal(t, test.ExpectedGlobals, globals)
})
}
}
func TestArgsV2(t *testing.T) {
tests := []struct {
Args []string
ExpectedCalls []taskfile.Call
ExpectedGlobals *taskfile.Vars
}{
{
Args: []string{"task-a", "task-b", "task-c"},
ExpectedCalls: []taskfile.Call{
{Task: "task-a"},
{Task: "task-b"},
{Task: "task-c"},
},
},
{
Args: []string{"task-a", "FOO=bar", "task-b", "task-c", "BAR=baz", "BAZ=foo"},
ExpectedCalls: []taskfile.Call{
{
Task: "task-a",
Vars: &taskfile.Vars{
Keys: []string{"FOO"},
Mapping: map[string]taskfile.Var{
"FOO": taskfile.Var{Static: "bar"},
},
},
},
{Task: "task-b"},
{
Task: "task-c",
Vars: &taskfile.Vars{
Keys: []string{"BAR", "BAZ"},
Mapping: map[string]taskfile.Var{
"BAR": taskfile.Var{Static: "baz"},
"BAZ": taskfile.Var{Static: "foo"},
},
},
},
},
},
{
Args: []string{"task-a", "CONTENT=with some spaces"},
ExpectedCalls: []taskfile.Call{
{
Task: "task-a",
Vars: &taskfile.Vars{
Keys: []string{"CONTENT"},
Mapping: map[string]taskfile.Var{
"CONTENT": taskfile.Var{Static: "with some spaces"},
},
},
},
},
},
{
Args: []string{"FOO=bar", "task-a", "task-b"},
ExpectedCalls: []taskfile.Call{
{Task: "task-a"},
{Task: "task-b"},
},
ExpectedGlobals: &taskfile.Vars{
Keys: []string{"FOO"},
Mapping: map[string]taskfile.Var{
"FOO": {Static: "bar"},
},
},
},
{
Args: nil,
ExpectedCalls: []taskfile.Call{
{Task: "default"},
},
},
{
Args: []string{},
ExpectedCalls: []taskfile.Call{
{Task: "default"},
},
},
{
Args: []string{"FOO=bar", "BAR=baz"},
ExpectedCalls: []taskfile.Call{
{Task: "default"},
},
ExpectedGlobals: &taskfile.Vars{
Keys: []string{"FOO", "BAR"},
Mapping: map[string]taskfile.Var{
"FOO": {Static: "bar"},
"BAR": {Static: "baz"},
},
},
},
}
for i, test := range tests {
t.Run(fmt.Sprintf("TestArgs%d", i+1), func(t *testing.T) {
calls, globals := args.ParseV2(test.Args...)
assert.Equal(t, test.ExpectedCalls, calls)
assert.Equal(t, test.ExpectedGlobals, globals)
if test.ExpectedGlobals.Len() > 0 || globals.Len() > 0 {
assert.Equal(t, test.ExpectedGlobals, globals)
assert.Equal(t, test.ExpectedGlobals, globals)
}
})
}
}

11
call.go Normal file
View File

@@ -0,0 +1,11 @@
package task
import "github.com/go-task/task/v3/taskfile/ast"
// Call is the parameters to a task call
type Call struct {
Task string
Vars *ast.Vars
Silent bool
Indirect bool // True if the task was called by another task
}

137
cmd/release/main.go Normal file
View File

@@ -0,0 +1,137 @@
package main
import (
"fmt"
"os"
"regexp"
"strings"
"time"
"github.com/Masterminds/semver/v3"
"github.com/spf13/pflag"
"github.com/go-task/task/v3/errors"
)
const (
changelogSource = "CHANGELOG.md"
changelogTarget = "website/src/docs/changelog.md"
versionFile = "internal/version/version.txt"
)
var changelogReleaseRegex = regexp.MustCompile(`## Unreleased`)
// Flags
var (
versionFlag bool
)
func init() {
pflag.BoolVarP(&versionFlag, "version", "v", false, "resolved version number")
pflag.Parse()
}
func main() {
if err := release(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
func release() error {
if len(pflag.Args()) != 1 {
return errors.New("error: expected version number")
}
version, err := getVersion(versionFile)
if err != nil {
return err
}
if err := bumpVersion(version, pflag.Arg(0)); err != nil {
return err
}
if versionFlag {
fmt.Println(version)
return nil
}
if err := changelog(version); err != nil {
return err
}
if err := setVersionFile(versionFile, version); err != nil {
return err
}
return nil
}
func getVersion(filename string) (*semver.Version, error) {
b, err := os.ReadFile(filename)
if err != nil {
return nil, err
}
return semver.NewVersion(strings.TrimSpace(string(b)))
}
func bumpVersion(version *semver.Version, verb string) error {
switch verb {
case "major":
*version = version.IncMajor()
case "minor":
*version = version.IncMinor()
case "patch":
*version = version.IncPatch()
default:
*version = *semver.MustParse(verb)
}
return nil
}
func changelog(version *semver.Version) error {
// Open changelog target file
b, err := os.ReadFile(changelogTarget)
if err != nil {
return err
}
// Get the current frontmatter
currentChangelog := string(b)
sections := strings.SplitN(currentChangelog, "---", 3)
if len(sections) != 3 {
return errors.New("error: invalid frontmatter")
}
frontmatter := strings.TrimSpace(sections[1])
// Open changelog source file
b, err = os.ReadFile(changelogSource)
if err != nil {
return err
}
changelog := string(b)
date := time.Now().Format("2006-01-02")
// Replace "Unreleased" with the new version and date
changelog = changelogReleaseRegex.ReplaceAllString(changelog, fmt.Sprintf("## v%s - %s", version, date))
// Write the changelog to the source file
if err := os.WriteFile(changelogSource, []byte(changelog), 0o644); err != nil { //nolint:gosec
return err
}
// Wrap the changelog content with v-pre directive for VitePress to prevent
// Vue from interpreting template syntax like {{.TASK_VERSION}}
changelogWithVPre := strings.Replace(changelog, "# Changelog\n\n", "# Changelog\n\n::: v-pre\n\n", 1) + "\n:::"
// Add the frontmatter to the changelog
changelogWithFrontmatter := fmt.Sprintf("---\n%s\n---\n\n%s", frontmatter, changelogWithVPre)
// Write the changelog to the target file
return os.WriteFile(changelogTarget, []byte(changelogWithFrontmatter), 0o644) //nolint:gosec
}
func setVersionFile(fileName string, version *semver.Version) error {
return os.WriteFile(fileName, []byte(version.String()+"\n"), 0o644)
}

171
cmd/sleepit/sleepit.go Normal file
View File

@@ -0,0 +1,171 @@
// This code is released under the MIT License
// Copyright (c) 2020 Marco Molteni and the timeit contributors.
package main
import (
"flag"
"fmt"
"os"
"os/signal"
"time"
)
const usage = `sleepit: sleep for the specified duration, optionally handling signals
When the line "sleepit: ready" is printed, it means that it is safe to send signals to it
Usage: sleepit <command> [<args>]
Commands
default Use default action: on reception of SIGINT terminate abruptly
handle Handle signals: on reception of SIGINT perform cleanup before exiting
version Show the sleepit version`
// Filled by the linker.
var fullVersion = "unknown" // example: v0.0.9-8-g941583d027-dirty
func main() {
os.Exit(run(os.Args[1:]))
}
func run(args []string) int {
if len(args) < 1 {
fmt.Fprintln(os.Stderr, usage)
return 2
}
defaultCmd := flag.NewFlagSet("default", flag.ExitOnError)
defaultSleep := defaultCmd.Duration("sleep", 5*time.Second, "Sleep duration")
handleCmd := flag.NewFlagSet("handle", flag.ExitOnError)
handleSleep := handleCmd.Duration("sleep", 5*time.Second, "Sleep duration")
handleCleanup := handleCmd.Duration("cleanup", 5*time.Second, "Cleanup duration")
handleTermAfter := handleCmd.Int("term-after", 0,
"Terminate immediately after `N` signals.\n"+
"Default is to terminate only when the cleanup phase has completed.")
versionCmd := flag.NewFlagSet("version", flag.ExitOnError)
switch args[0] {
case "default":
_ = defaultCmd.Parse(args[1:])
if len(defaultCmd.Args()) > 0 {
fmt.Fprintf(os.Stderr, "default: unexpected arguments: %v\n", defaultCmd.Args())
return 2
}
return supervisor(*defaultSleep, 0, 0, nil)
case "handle":
_ = handleCmd.Parse(args[1:])
if *handleTermAfter == 1 {
fmt.Fprintf(os.Stderr, "handle: term-after cannot be 1\n")
return 2
}
if len(handleCmd.Args()) > 0 {
fmt.Fprintf(os.Stderr, "handle: unexpected arguments: %v\n", handleCmd.Args())
return 2
}
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, os.Interrupt) // Ctrl-C -> SIGINT
return supervisor(*handleSleep, *handleCleanup, *handleTermAfter, sigCh)
case "version":
_ = versionCmd.Parse(args[1:])
if len(versionCmd.Args()) > 0 {
fmt.Fprintf(os.Stderr, "version: unexpected arguments: %v\n", versionCmd.Args())
return 2
}
fmt.Printf("sleepit version %s\n", fullVersion)
return 0
default:
fmt.Fprintln(os.Stderr, usage)
return 2
}
}
func supervisor(
sleep time.Duration,
cleanup time.Duration,
termAfter int,
sigCh <-chan os.Signal,
) int {
fmt.Printf("sleepit: ready\n")
fmt.Printf("sleepit: PID=%d sleep=%v cleanup=%v\n",
os.Getpid(), sleep, cleanup)
cancelWork := make(chan struct{})
workerDone := worker(cancelWork, sleep, "work")
cancelCleaner := make(chan struct{})
var cleanerDone <-chan struct{}
sigCount := 0
for {
select {
case sig := <-sigCh:
sigCount++
fmt.Printf("sleepit: got signal=%s count=%d\n", sig, sigCount)
if sigCount == 1 {
// since `cancelWork` is unbuffered, sending will be synchronous:
// we are ensured that the worker has terminated before starting cleanup.
// This is important in some real-life situations.
cancelWork <- struct{}{}
cleanerDone = worker(cancelCleaner, cleanup, "cleanup")
}
if sigCount == termAfter {
cancelCleaner <- struct{}{}
return 4
}
case <-workerDone:
return 0
case <-cleanerDone:
return 3
}
}
}
// Start a worker goroutine and return immediately a `workerDone` channel.
// The goroutine will prepend its prints with the prefix `name`.
// The goroutine will simulate some work and will terminate when one of the following
// conditions happens:
// 1. When `howlong` is elapsed. This case will be signaled on the `workerDone` channel.
// 2. When something happens on channel `canceled`. Note that this simulates real-life,
// so cancellation is not instantaneous: if the caller wants a synchronous cancel,
// it should send a message; if instead it wants an asynchronous cancel, it should
// close the channel.
func worker(
canceled <-chan struct{},
howlong time.Duration,
name string,
) <-chan struct{} {
workerDone := make(chan struct{})
deadline := time.Now().Add(howlong)
go func() {
fmt.Printf("sleepit: %s started\n", name)
for {
select {
case <-canceled:
fmt.Printf("sleepit: %s canceled\n", name)
return
default:
if doSomeWork(deadline) {
fmt.Printf("sleepit: %s done\n", name) // <== NOTE THIS LINE
workerDone <- struct{}{}
return
}
}
}
}()
return workerDone
}
// Do some work and then return, so that the caller can decide whether to continue or not.
// Return true when all work is done.
func doSomeWork(deadline time.Time) bool {
if time.Now().After(deadline) {
return true
}
timeout := 100 * time.Millisecond
time.Sleep(timeout)
return false
}

View File

@@ -3,193 +3,201 @@ package main
import (
"context"
"fmt"
"log"
"os"
"os/signal"
"path/filepath"
"syscall"
"strconv"
"github.com/spf13/pflag"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/args"
"github.com/go-task/task/v3/errors"
"github.com/go-task/task/v3/experiments"
"github.com/go-task/task/v3/internal/filepathext"
"github.com/go-task/task/v3/internal/flags"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/taskfile"
"github.com/go-task/task/v3/internal/version"
"github.com/go-task/task/v3/taskfile/ast"
)
var (
version = "master"
)
const usage = `Usage: task [-ilfwvsd] [--init] [--list] [--force] [--watch] [--verbose] [--silent] [--dir] [--taskfile] [--dry] [--summary] [task...]
Runs the specified task(s). Falls back to the "default" task if no task name
was specified, or lists all tasks if an unknown task name was specified.
Example: 'task hello' with the following 'Taskfile.yml' file will generate an
'output.txt' file with the content "hello".
'''
version: '3'
tasks:
hello:
cmds:
- echo "I am going to write a file named 'output.txt' now."
- echo "hello" > output.txt
generates:
- output.txt
'''
Options:
`
func main() {
log.SetFlags(0)
log.SetOutput(os.Stderr)
pflag.Usage = func() {
log.Print(usage)
pflag.PrintDefaults()
if err := run(); err != nil {
l := &logger.Logger{
Stdout: os.Stdout,
Stderr: os.Stderr,
Verbose: flags.Verbose,
Color: flags.Color,
}
if err, ok := err.(*errors.TaskRunError); ok && flags.ExitCode {
emitCIErrorAnnotation(err)
l.Errf(logger.Red, "%v\n", err)
os.Exit(err.TaskExitCode())
}
if err, ok := err.(errors.TaskError); ok {
emitCIErrorAnnotation(err)
l.Errf(logger.Red, "%v\n", err)
os.Exit(err.Code())
}
emitCIErrorAnnotation(err)
l.Errf(logger.Red, "%v\n", err)
os.Exit(errors.CodeUnknown)
}
os.Exit(errors.CodeOk)
}
var (
versionFlag bool
helpFlag bool
init bool
list bool
status bool
force bool
watch bool
verbose bool
silent bool
dry bool
summary bool
parallel bool
dir string
entrypoint string
output string
color bool
)
pflag.BoolVar(&versionFlag, "version", false, "show Task version")
pflag.BoolVarP(&helpFlag, "help", "h", false, "shows Task usage")
pflag.BoolVarP(&init, "init", "i", false, "creates a new Taskfile.yml in the current folder")
pflag.BoolVarP(&list, "list", "l", false, "lists tasks with description of current Taskfile")
pflag.BoolVar(&status, "status", false, "exits with non-zero exit code if any of the given tasks is not up-to-date")
pflag.BoolVarP(&force, "force", "f", false, "forces execution even when the task is up-to-date")
pflag.BoolVarP(&watch, "watch", "w", false, "enables watch of the given task")
pflag.BoolVarP(&verbose, "verbose", "v", false, "enables verbose mode")
pflag.BoolVarP(&silent, "silent", "s", false, "disables echoing")
pflag.BoolVarP(&parallel, "parallel", "p", false, "executes tasks provided on command line in parallel")
pflag.BoolVar(&dry, "dry", false, "compiles and prints tasks in the order that they would be run, without executing them")
pflag.BoolVar(&summary, "summary", false, "show summary about a task")
pflag.StringVarP(&dir, "dir", "d", "", "sets directory of execution")
pflag.StringVarP(&entrypoint, "taskfile", "t", "", `choose which Taskfile to run. Defaults to "Taskfile.yml"`)
pflag.StringVarP(&output, "output", "o", "", "sets output style: [interleaved|group|prefixed]")
pflag.BoolVarP(&color, "color", "c", true, "colored output")
pflag.Parse()
if versionFlag {
fmt.Printf("Task version: %s\n", version)
// emitCIErrorAnnotation emits an error annotation for supported CI providers.
func emitCIErrorAnnotation(err error) {
if isGA, _ := strconv.ParseBool(os.Getenv("GITHUB_ACTIONS")); !isGA {
return
}
if e, ok := err.(*errors.TaskRunError); ok {
fmt.Fprintf(os.Stdout, "::error title=Task '%s' failed::%v\n", e.TaskName, e.Err)
return
}
fmt.Fprintf(os.Stdout, "::error title=Task failed::%v\n", err)
}
if helpFlag {
func run() error {
log := &logger.Logger{
Stdout: os.Stdout,
Stderr: os.Stderr,
Verbose: flags.Verbose,
Color: flags.Color,
}
if err := flags.Validate(); err != nil {
return err
}
if err := experiments.Validate(); err != nil {
log.Warnf("%s\n", err.Error())
}
if flags.Version {
fmt.Println(version.GetVersionWithBuildInfo())
return nil
}
if flags.Help {
pflag.Usage()
return
return nil
}
if init {
if flags.Experiments {
return log.PrintExperiments()
}
if flags.Init {
wd, err := os.Getwd()
if err != nil {
log.Fatal(err)
return err
}
if err := task.InitTaskfile(os.Stdout, wd); err != nil {
log.Fatal(err)
args, _, err := args.Get()
if err != nil {
return err
}
return
path := wd
if len(args) > 0 {
name := args[0]
if filepathext.IsExtOnly(name) {
name = filepathext.SmartJoin(filepath.Dir(name), "Taskfile"+filepath.Ext(name))
}
path = filepathext.SmartJoin(wd, name)
}
finalPath, err := task.InitTaskfile(path)
if err != nil {
return err
}
if !flags.Silent {
if flags.Verbose {
log.Outf(logger.Default, "%s\n", task.DefaultTaskfile)
}
log.Outf(logger.Green, "Taskfile created: %s\n", filepathext.TryAbsToRel(finalPath))
}
return nil
}
if dir != "" && entrypoint != "" {
log.Fatal("task: You can't set both --dir and --taskfile")
return
}
if entrypoint != "" {
dir = filepath.Dir(entrypoint)
entrypoint = filepath.Base(entrypoint)
} else {
entrypoint = "Taskfile.yml"
if flags.Completion != "" {
script, err := task.Completion(flags.Completion)
if err != nil {
return err
}
fmt.Println(script)
return nil
}
e := task.Executor{
Force: force,
Watch: watch,
Verbose: verbose,
Silent: silent,
Dir: dir,
Dry: dry,
Entrypoint: entrypoint,
Summary: summary,
Parallel: parallel,
Color: color,
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
OutputStyle: output,
}
if err := e.Setup(); err != nil {
log.Fatal(err)
}
v, err := e.Taskfile.ParsedVersion()
if err != nil {
log.Fatal(err)
return
}
if list {
e.PrintTasksHelp()
return
}
var (
calls []taskfile.Call
globals *taskfile.Vars
e := task.NewExecutor(
flags.WithFlags(),
task.WithVersionCheck(true),
)
if v >= 3.0 {
calls, globals = args.ParseV3(pflag.Args()...)
} else {
calls, globals = args.ParseV2(pflag.Args()...)
if err := e.Setup(); err != nil {
return err
}
if flags.ClearCache {
cachePath := filepath.Join(e.TempDir.Remote, "remote")
return os.RemoveAll(cachePath)
}
listOptions := task.NewListOptions(
flags.List,
flags.ListAll,
flags.ListJson,
flags.NoStatus,
flags.Nested,
)
if listOptions.ShouldListTasks() {
if flags.Silent {
return e.ListTaskNames(flags.ListAll)
}
foundTasks, err := e.ListTasks(listOptions)
if err != nil {
return err
}
if !foundTasks {
os.Exit(errors.CodeUnknown)
}
return nil
}
// Parse the remaining arguments
cliArgsPreDash, cliArgsPostDash, err := args.Get()
if err != nil {
return err
}
calls, globals := args.Parse(cliArgsPreDash...)
// If there are no calls, run the default task instead
if len(calls) == 0 {
calls = append(calls, &task.Call{Task: "default"})
}
// Merge CLI variables first (e.g. FOO=bar) so they take priority over Taskfile defaults
e.Taskfile.Vars.Merge(globals, nil)
// Then ReverseMerge special variables so they're available for templating
cliArgsPostDashQuoted, err := args.ToQuotedString(cliArgsPostDash)
if err != nil {
return err
}
specialVars := ast.NewVars()
specialVars.Set("CLI_ARGS", ast.Var{Value: cliArgsPostDashQuoted})
specialVars.Set("CLI_ARGS_LIST", ast.Var{Value: cliArgsPostDash})
specialVars.Set("CLI_FORCE", ast.Var{Value: flags.Force || flags.ForceAll})
specialVars.Set("CLI_SILENT", ast.Var{Value: flags.Silent})
specialVars.Set("CLI_VERBOSE", ast.Var{Value: flags.Verbose})
specialVars.Set("CLI_OFFLINE", ast.Var{Value: flags.Offline})
specialVars.Set("CLI_ASSUME_YES", ast.Var{Value: flags.AssumeYes})
e.Taskfile.Vars.ReverseMerge(specialVars, nil)
if !flags.Watch {
e.InterceptInterruptSignals()
}
e.Taskfile.Vars.Merge(globals)
ctx := context.Background()
if !watch {
ctx = getSignalContext()
if flags.Status {
return e.Status(ctx, calls...)
}
if status {
if err := e.Status(ctx, calls...); err != nil {
log.Fatal(err)
}
return
}
if err := e.Run(ctx, calls...); err != nil {
e.Logger.Errf(logger.Red, "%v", err)
os.Exit(1)
}
}
func getSignalContext() context.Context {
ch := make(chan os.Signal, 1)
signal.Notify(ch, os.Interrupt, os.Kill, syscall.SIGTERM)
ctx, cancel := context.WithCancel(context.Background())
go func() {
sig := <-ch
log.Printf("task: signal received: %s", sig)
cancel()
}()
return ctx
return e.Run(ctx, calls...)
}

231
compiler.go Normal file
View File

@@ -0,0 +1,231 @@
package task
import (
"bytes"
"context"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
"github.com/go-task/task/v3/internal/env"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/filepathext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/templater"
"github.com/go-task/task/v3/internal/version"
"github.com/go-task/task/v3/taskfile/ast"
)
type Compiler struct {
Dir string
Entrypoint string
UserWorkingDir string
TaskfileEnv *ast.Vars
TaskfileVars *ast.Vars
Logger *logger.Logger
dynamicCache map[string]string
muDynamicCache sync.Mutex
}
func (c *Compiler) GetTaskfileVariables() (*ast.Vars, error) {
return c.getVariables(nil, nil, true)
}
func (c *Compiler) GetVariables(t *ast.Task, call *Call) (*ast.Vars, error) {
return c.getVariables(t, call, true)
}
func (c *Compiler) FastGetVariables(t *ast.Task, call *Call) (*ast.Vars, error) {
return c.getVariables(t, call, false)
}
func (c *Compiler) getVariables(t *ast.Task, call *Call, evaluateShVars bool) (*ast.Vars, error) {
result := env.GetEnviron()
specialVars, err := c.getSpecialVars(t, call)
if err != nil {
return nil, err
}
for k, v := range specialVars {
result.Set(k, ast.Var{Value: v})
}
getRangeFunc := func(dir string) func(k string, v ast.Var) error {
return func(k string, v ast.Var) error {
cache := &templater.Cache{Vars: result}
// Replace values
newVar := templater.ReplaceVar(v, cache)
// If the variable should not be evaluated, but is nil, set it to an empty string
// This stops empty interface errors when using the templater to replace values later
// Preserve the Sh field so it can be displayed in summary
if !evaluateShVars && newVar.Value == nil {
result.Set(k, ast.Var{Value: "", Sh: newVar.Sh})
return nil
}
// If the variable should not be evaluated and it is set, we can set it and return
if !evaluateShVars {
result.Set(k, ast.Var{Value: newVar.Value, Sh: newVar.Sh})
return nil
}
// Now we can check for errors since we've handled all the cases when we don't want to evaluate
if err := cache.Err(); err != nil {
return err
}
// If the variable is already set, we can set it and return
if newVar.Value != nil || newVar.Sh == nil {
result.Set(k, ast.Var{Value: newVar.Value})
return nil
}
// If the variable is dynamic, we need to resolve it first
static, err := c.HandleDynamicVar(newVar, dir, env.GetFromVars(result))
if err != nil {
return err
}
result.Set(k, ast.Var{Value: static})
return nil
}
}
rangeFunc := getRangeFunc(c.Dir)
var taskRangeFunc func(k string, v ast.Var) error
if t != nil {
// NOTE(@andreynering): We're manually joining these paths here because
// this is the raw task, not the compiled one.
cache := &templater.Cache{Vars: result}
dir := templater.Replace(t.Dir, cache)
if err := cache.Err(); err != nil {
return nil, err
}
dir = filepathext.SmartJoin(c.Dir, dir)
taskRangeFunc = getRangeFunc(dir)
}
for k, v := range c.TaskfileEnv.All() {
if err := rangeFunc(k, v); err != nil {
return nil, err
}
}
for k, v := range c.TaskfileVars.All() {
if err := rangeFunc(k, v); err != nil {
return nil, err
}
}
if t != nil {
for k, v := range t.IncludeVars.All() {
if err := rangeFunc(k, v); err != nil {
return nil, err
}
}
for k, v := range t.IncludedTaskfileVars.All() {
if err := taskRangeFunc(k, v); err != nil {
return nil, err
}
}
}
if t == nil || call == nil {
return result, nil
}
for k, v := range call.Vars.All() {
if err := rangeFunc(k, v); err != nil {
return nil, err
}
}
for k, v := range t.Vars.All() {
if err := taskRangeFunc(k, v); err != nil {
return nil, err
}
}
return result, nil
}
func (c *Compiler) HandleDynamicVar(v ast.Var, dir string, e []string) (string, error) {
c.muDynamicCache.Lock()
defer c.muDynamicCache.Unlock()
// If the variable is not dynamic or it is empty, return an empty string
if v.Sh == nil || *v.Sh == "" {
return "", nil
}
if c.dynamicCache == nil {
c.dynamicCache = make(map[string]string, 30)
}
if result, ok := c.dynamicCache[*v.Sh]; ok {
return result, nil
}
// NOTE(@andreynering): If a var have a specific dir, use this instead
if v.Dir != "" {
dir = v.Dir
}
var stdout bytes.Buffer
opts := &execext.RunCommandOptions{
Command: *v.Sh,
Dir: dir,
Stdout: &stdout,
Stderr: c.Logger.Stderr,
Env: e,
}
if err := execext.RunCommand(context.Background(), opts); err != nil {
return "", fmt.Errorf(`task: Command "%s" failed: %s`, opts.Command, err)
}
// Trim a single trailing newline from the result to make most command
// output easier to use in shell commands.
result := strings.TrimSuffix(stdout.String(), "\r\n")
result = strings.TrimSuffix(result, "\n")
c.dynamicCache[*v.Sh] = result
c.Logger.VerboseErrf(logger.Magenta, "task: dynamic variable: %q result: %q\n", *v.Sh, result)
return result, nil
}
// ResetCache clear the dynamic variables cache
func (c *Compiler) ResetCache() {
c.muDynamicCache.Lock()
defer c.muDynamicCache.Unlock()
c.dynamicCache = nil
}
func (c *Compiler) getSpecialVars(t *ast.Task, call *Call) (map[string]string, error) {
// Use filepath.ToSlash for all paths to ensure consistent forward slashes
// across platforms. This prevents issues with backslashes being interpreted
// as escape sequences when paths are used in shell commands on Windows.
allVars := map[string]string{
"TASK_EXE": filepath.ToSlash(os.Args[0]),
"ROOT_TASKFILE": filepath.ToSlash(filepathext.SmartJoin(c.Dir, c.Entrypoint)),
"ROOT_DIR": filepath.ToSlash(c.Dir),
"USER_WORKING_DIR": filepath.ToSlash(c.UserWorkingDir),
"TASK_VERSION": version.GetVersion(),
"PATH_LIST_SEPARATOR": string(os.PathListSeparator),
"FILE_PATH_SEPARATOR": string(os.PathSeparator),
}
if t != nil {
allVars["TASK"] = t.Task
allVars["TASK_DIR"] = filepath.ToSlash(filepathext.SmartJoin(c.Dir, t.Dir))
allVars["TASKFILE"] = filepath.ToSlash(t.Location.Taskfile)
allVars["TASKFILE_DIR"] = filepath.ToSlash(filepath.Dir(t.Location.Taskfile))
} else {
allVars["TASK"] = ""
allVars["TASK_DIR"] = ""
allVars["TASKFILE"] = ""
allVars["TASKFILE_DIR"] = ""
}
if call != nil {
allVars["ALIAS"] = call.Task
} else {
allVars["ALIAS"] = ""
}
return allVars, nil
}

34
completion.go Normal file
View File

@@ -0,0 +1,34 @@
package task
import (
_ "embed"
"fmt"
)
//go:embed completion/bash/task.bash
var completionBash string
//go:embed completion/fish/task.fish
var completionFish string
//go:embed completion/ps/task.ps1
var completionPowershell string
//go:embed completion/zsh/_task
var completionZsh string
func Completion(completion string) (string, error) {
// Get the file extension for the selected shell
switch completion {
case "bash":
return completionBash, nil
case "fish":
return completionFish, nil
case "powershell":
return completionPowershell, nil
case "zsh":
return completionZsh, nil
default:
return "", fmt.Errorf("unknown shell: %s", completion)
}
}

View File

@@ -1,21 +1,60 @@
_task_completion()
# vim: set tabstop=2 shiftwidth=2 expandtab:
_GO_TASK_COMPLETION_LIST_OPTION='--list-all'
TASK_CMD="${TASK_EXE:-task}"
function _task()
{
local scripts;
local curr_arg;
local cur prev words cword
_init_completion -n : || return
# Remove colon from word breaks
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
# Check for `--` within command-line and quit or strip suffix.
local i
for i in "${!words[@]}"; do
if [ "${words[$i]}" == "--" ]; then
# Do not complete words following `--` passed to CLI_ARGS.
[ $cword -gt $i ] && return
# Remove the words following `--` to not put --list in CLI_ARGS.
words=( "${words[@]:0:$i}" )
break
fi
done
scripts=$(task -l | sed '1d' | awk '{ print $2 }' | sed 's/:$//');
# Handle special arguments of options.
case "$prev" in
-d|--dir|--remote-cache-dir)
_filedir -d
return $?
;;
--cacert|--cert|--cert-key)
_filedir
return $?
;;
-t|--taskfile)
_filedir yaml || return $?
_filedir yml
return $?
;;
-o|--output)
COMPREPLY=( $( compgen -W "interleaved group prefixed" -- $cur ) )
return 0
;;
esac
curr_arg="${COMP_WORDS[COMP_CWORD]:-"."}"
# Handle normal options.
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "$(_parse_help $1)" -- $cur ) )
return 0
;;
esac
# Do not accept more than 1 argument
if [ "${#COMP_WORDS[@]}" != "2" ]; then
return
fi
# Prepare task name completions.
local tasks=( $( "${words[@]}" --silent $_GO_TASK_COMPLETION_LIST_OPTION 2> /dev/null ) )
COMPREPLY=( $( compgen -W "${tasks[*]}" -- "$cur" ) )
COMPREPLY=($(compgen -c | echo "$scripts" | grep $curr_arg));
# Post-process because task names might contain colons.
__ltrim_colon_completions "$cur"
}
complete -F _task_completion task
complete -F _task "$TASK_CMD"

View File

@@ -1,24 +1,120 @@
function __task_get_tasks --description "Prints all available tasks with their description"
task -l | sed '1d' | awk '{ $1=""; print $0 }' | tr ': ', '\t' | string trim
set -l GO_TASK_PROGNAME (if set -q GO_TASK_PROGNAME; echo $GO_TASK_PROGNAME; else if set -q TASK_EXE; echo $TASK_EXE; else; echo task; end)
# Cache variables for experiments (global)
set -g __task_experiments_cache ""
set -g __task_experiments_cache_time 0
# Helper function to get experiments with 1-second cache
function __task_get_experiments --inherit-variable GO_TASK_PROGNAME
set -l now (date +%s)
set -l ttl 1 # Cache for 1 second only
# Return cached value if still valid
if test (math "$now - $__task_experiments_cache_time") -lt $ttl
printf '%s\n' $__task_experiments_cache
return
end
# Refresh cache
set -g __task_experiments_cache ($GO_TASK_PROGNAME --experiments 2>/dev/null)
set -g __task_experiments_cache_time $now
printf '%s\n' $__task_experiments_cache
end
complete -c task -d 'Runs the specified task(s). Falls back to the "default" task if no task name was specified, or lists all tasks if an unknown task name was
specified.' -xa "(__task_get_tasks)"
# Helper function to check if an experiment is enabled
function __task_is_experiment_enabled
set -l experiment $argv[1]
__task_get_experiments | string match -qr "^\* $experiment:.*on"
end
function __task_get_tasks --description "Prints all available tasks with their description" --inherit-variable GO_TASK_PROGNAME
# Check if the global task is requested
set -l global_task false
commandline --current-process | read --tokenize --list --local cmd_args
for arg in $cmd_args
if test "_$arg" = "_--"
break # ignore arguments to be passed to the task
end
if test "_$arg" = "_--global" -o "_$arg" = "_-g"
set global_task true
break
end
end
complete -c task -s c -l color -d 'colored output (default true)'
complete -c task -s d -l dir -d 'sets directory of execution'
complete -c task -l dry -d 'compiles and prints tasks in the order that they would be run, without executing them'
complete -c task -s f -l force -d 'forces execution even when the task is up-to-date'
complete -c task -s h -l help -d 'shows Task usage'
complete -c task -s i -l init -d 'creates a new Taskfile.yml in the current folder'
complete -c task -s l -l list -d 'lists tasks with description of current Taskfile'
complete -c task -s o -l output -d 'sets output style: [interleaved|group|prefixed]' -xa "interleaved group prefixed"
complete -c task -s p -l parallel -d 'executes tasks provided on command line in parallel'
complete -c task -s s -l silent -d 'disables echoing'
complete -c task -l status -d 'exits with non-zero exit code if any of the given tasks is not up-to-date'
complete -c task -l summary -d 'show summary about a task'
complete -c task -s t -l taskfile -d 'choose which Taskfile to run. Defaults to "Taskfile.yml"'
complete -c task -s v -l verbose -d 'enables verbose mode'
complete -c task -l version -d 'show Task version'
complete -c task -s w -l watch -d 'enables watch of the given task'
# Read the list of tasks (and potential errors)
if $global_task
$GO_TASK_PROGNAME --global --list-all
else
$GO_TASK_PROGNAME --list-all
end 2>&1 | read -lz rawOutput
# Return on non-zero exit code (for cases when there is no Taskfile found or etc.)
if test $status -ne 0
return
end
# Grab names and descriptions (if any) of the tasks
set -l output (echo $rawOutput | sed -e '1d; s/\* \(.*\):[[:space:]]\{2,\}\(.*\)[[:space:]]\{2,\}(\(aliases.*\))/\1\t\2\t\3/' -e 's/\* \(.*\):[[:space:]]\{2,\}\(.*\)/\1\t\2/'| string split0)
if test $output
echo $output
end
end
complete -c $GO_TASK_PROGNAME \
-d 'Runs the specified task(s). Falls back to the "default" task if no task name was specified, or lists all tasks if an unknown task name was specified.' \
-xa "(__task_get_tasks)" \
-n "not __fish_seen_subcommand_from --"
# Standard flags
complete -c $GO_TASK_PROGNAME -s a -l list-all -d 'list all tasks'
complete -c $GO_TASK_PROGNAME -s c -l color -d 'colored output (default true)'
complete -c $GO_TASK_PROGNAME -s C -l concurrency -d 'limit number of concurrent tasks'
complete -c $GO_TASK_PROGNAME -l completion -d 'generate shell completion script' -xa "bash zsh fish powershell"
complete -c $GO_TASK_PROGNAME -s d -l dir -d 'set directory of execution'
complete -c $GO_TASK_PROGNAME -l disable-fuzzy -d 'disable fuzzy matching for task names'
complete -c $GO_TASK_PROGNAME -s n -l dry -d 'compile and print tasks without executing'
complete -c $GO_TASK_PROGNAME -s x -l exit-code -d 'pass-through exit code of task command'
complete -c $GO_TASK_PROGNAME -l experiments -d 'list available experiments'
complete -c $GO_TASK_PROGNAME -s F -l failfast -d 'when running tasks in parallel, stop all tasks if one fails'
complete -c $GO_TASK_PROGNAME -s f -l force -d 'force execution even when up-to-date'
complete -c $GO_TASK_PROGNAME -s g -l global -d 'run global Taskfile from home directory'
complete -c $GO_TASK_PROGNAME -s h -l help -d 'show help'
complete -c $GO_TASK_PROGNAME -s i -l init -d 'create new Taskfile'
complete -c $GO_TASK_PROGNAME -l insecure -d 'allow insecure Taskfile downloads'
complete -c $GO_TASK_PROGNAME -s I -l interval -d 'interval to watch for changes'
complete -c $GO_TASK_PROGNAME -s j -l json -d 'format task list as JSON'
complete -c $GO_TASK_PROGNAME -s l -l list -d 'list tasks with descriptions'
complete -c $GO_TASK_PROGNAME -l nested -d 'nest namespaces when listing as JSON'
complete -c $GO_TASK_PROGNAME -l no-status -d 'ignore status when listing as JSON'
complete -c $GO_TASK_PROGNAME -l interactive -d 'prompt for missing required variables'
complete -c $GO_TASK_PROGNAME -s o -l output -d 'set output style' -xa "interleaved group prefixed"
complete -c $GO_TASK_PROGNAME -l output-group-begin -d 'message template before grouped output'
complete -c $GO_TASK_PROGNAME -l output-group-end -d 'message template after grouped output'
complete -c $GO_TASK_PROGNAME -l output-group-error-only -d 'hide output from successful tasks'
complete -c $GO_TASK_PROGNAME -s p -l parallel -d 'execute tasks in parallel'
complete -c $GO_TASK_PROGNAME -s s -l silent -d 'disable echoing'
complete -c $GO_TASK_PROGNAME -l sort -d 'set task sorting order' -xa "default alphanumeric none"
complete -c $GO_TASK_PROGNAME -l status -d 'exit non-zero if tasks not up-to-date'
complete -c $GO_TASK_PROGNAME -l summary -d 'show task summary'
complete -c $GO_TASK_PROGNAME -s t -l taskfile -d 'choose Taskfile to run'
complete -c $GO_TASK_PROGNAME -s v -l verbose -d 'verbose output'
complete -c $GO_TASK_PROGNAME -l version -d 'show version'
complete -c $GO_TASK_PROGNAME -s w -l watch -d 'watch mode, re-run on changes'
complete -c $GO_TASK_PROGNAME -s y -l yes -d 'assume yes to all prompts'
# Experimental flags (dynamically checked at completion time via -n condition)
# GentleForce experiment
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled GENTLE_FORCE" -l force-all -d 'force execution of task and all dependencies'
# RemoteTaskfiles experiment - Options
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l offline -d 'use only local or cached Taskfiles'
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l timeout -d 'timeout for remote Taskfile downloads'
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l expiry -d 'cache expiry duration'
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l remote-cache-dir -d 'directory to cache remote Taskfiles' -xa "(__fish_complete_directories)"
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l cacert -d 'custom CA certificate for TLS' -r
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l cert -d 'client certificate for mTLS' -r
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l cert-key -d 'client certificate private key' -r
# RemoteTaskfiles experiment - Operations
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l download -d 'download remote Taskfile'
complete -c $GO_TASK_PROGNAME -n "__task_is_experiment_enabled REMOTE_TASKFILES" -l clear-cache -d 'clear remote Taskfile cache'

View File

@@ -1,10 +1,92 @@
$scriptBlock = {
param($commandName, $wordToComplete, $cursorPosition)
$curReg = "task{.exe}? (.*?)$"
$startsWith = $wordToComplete | Select-String $curReg -AllMatches | ForEach-Object { $_.Matches.Groups[1].Value }
$reg = "\* ($startsWith.+?):"
$listOutput = $(task -l)
$listOutput | Select-String $reg -AllMatches | ForEach-Object { $_.Matches.Groups[1].Value + " " }
}
using namespace System.Management.Automation
Register-ArgumentCompleter -Native -CommandName task -ScriptBlock $scriptBlock
Register-ArgumentCompleter -CommandName task -ScriptBlock {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
if ($commandName.StartsWith('-')) {
$completions = @(
# Standard flags (alphabetical order)
[CompletionResult]::new('-a', '-a', [CompletionResultType]::ParameterName, 'list all tasks'),
[CompletionResult]::new('--list-all', '--list-all', [CompletionResultType]::ParameterName, 'list all tasks'),
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'colored output'),
[CompletionResult]::new('--color', '--color', [CompletionResultType]::ParameterName, 'colored output'),
[CompletionResult]::new('-C', '-C', [CompletionResultType]::ParameterName, 'limit concurrent tasks'),
[CompletionResult]::new('--concurrency', '--concurrency', [CompletionResultType]::ParameterName, 'limit concurrent tasks'),
[CompletionResult]::new('--completion', '--completion', [CompletionResultType]::ParameterName, 'generate shell completion'),
[CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'set directory'),
[CompletionResult]::new('--dir', '--dir', [CompletionResultType]::ParameterName, 'set directory'),
[CompletionResult]::new('--disable-fuzzy', '--disable-fuzzy', [CompletionResultType]::ParameterName, 'disable fuzzy matching'),
[CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'dry run'),
[CompletionResult]::new('--dry', '--dry', [CompletionResultType]::ParameterName, 'dry run'),
[CompletionResult]::new('-x', '-x', [CompletionResultType]::ParameterName, 'pass-through exit code'),
[CompletionResult]::new('--exit-code', '--exit-code', [CompletionResultType]::ParameterName, 'pass-through exit code'),
[CompletionResult]::new('--experiments', '--experiments', [CompletionResultType]::ParameterName, 'list experiments'),
[CompletionResult]::new('-F', '-F', [CompletionResultType]::ParameterName, 'fail fast on pallalel tasks'),
[CompletionResult]::new('--failfast', '--failfast', [CompletionResultType]::ParameterName, 'force execution'),
[CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'force execution'),
[CompletionResult]::new('--force', '--force', [CompletionResultType]::ParameterName, 'force execution'),
[CompletionResult]::new('-g', '-g', [CompletionResultType]::ParameterName, 'run global Taskfile'),
[CompletionResult]::new('--global', '--global', [CompletionResultType]::ParameterName, 'run global Taskfile'),
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'show help'),
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'show help'),
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'create new Taskfile'),
[CompletionResult]::new('--init', '--init', [CompletionResultType]::ParameterName, 'create new Taskfile'),
[CompletionResult]::new('--insecure', '--insecure', [CompletionResultType]::ParameterName, 'allow insecure downloads'),
[CompletionResult]::new('-I', '-I', [CompletionResultType]::ParameterName, 'watch interval'),
[CompletionResult]::new('--interval', '--interval', [CompletionResultType]::ParameterName, 'watch interval'),
[CompletionResult]::new('-j', '-j', [CompletionResultType]::ParameterName, 'format as JSON'),
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'format as JSON'),
[CompletionResult]::new('-l', '-l', [CompletionResultType]::ParameterName, 'list tasks'),
[CompletionResult]::new('--list', '--list', [CompletionResultType]::ParameterName, 'list tasks'),
[CompletionResult]::new('--nested', '--nested', [CompletionResultType]::ParameterName, 'nest namespaces in JSON'),
[CompletionResult]::new('--no-status', '--no-status', [CompletionResultType]::ParameterName, 'ignore status in JSON'),
[CompletionResult]::new('--interactive', '--interactive', [CompletionResultType]::ParameterName, 'prompt for missing required variables'),
[CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'set output style'),
[CompletionResult]::new('--output', '--output', [CompletionResultType]::ParameterName, 'set output style'),
[CompletionResult]::new('--output-group-begin', '--output-group-begin', [CompletionResultType]::ParameterName, 'template before group'),
[CompletionResult]::new('--output-group-end', '--output-group-end', [CompletionResultType]::ParameterName, 'template after group'),
[CompletionResult]::new('--output-group-error-only', '--output-group-error-only', [CompletionResultType]::ParameterName, 'hide successful output'),
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'execute in parallel'),
[CompletionResult]::new('--parallel', '--parallel', [CompletionResultType]::ParameterName, 'execute in parallel'),
[CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'silent mode'),
[CompletionResult]::new('--silent', '--silent', [CompletionResultType]::ParameterName, 'silent mode'),
[CompletionResult]::new('--sort', '--sort', [CompletionResultType]::ParameterName, 'task sorting order'),
[CompletionResult]::new('--status', '--status', [CompletionResultType]::ParameterName, 'check task status'),
[CompletionResult]::new('--summary', '--summary', [CompletionResultType]::ParameterName, 'show task summary'),
[CompletionResult]::new('-t', '-t', [CompletionResultType]::ParameterName, 'choose Taskfile'),
[CompletionResult]::new('--taskfile', '--taskfile', [CompletionResultType]::ParameterName, 'choose Taskfile'),
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'verbose output'),
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'verbose output'),
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'show version'),
[CompletionResult]::new('-w', '-w', [CompletionResultType]::ParameterName, 'watch mode'),
[CompletionResult]::new('--watch', '--watch', [CompletionResultType]::ParameterName, 'watch mode'),
[CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'assume yes'),
[CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'assume yes')
)
# Experimental flags (dynamically added based on enabled experiments)
$experiments = & task --experiments 2>$null | Out-String
if ($experiments -match '\* GENTLE_FORCE:.*on') {
$completions += [CompletionResult]::new('--force-all', '--force-all', [CompletionResultType]::ParameterName, 'force all dependencies')
}
if ($experiments -match '\* REMOTE_TASKFILES:.*on') {
# Options
$completions += [CompletionResult]::new('--offline', '--offline', [CompletionResultType]::ParameterName, 'use cached Taskfiles')
$completions += [CompletionResult]::new('--timeout', '--timeout', [CompletionResultType]::ParameterName, 'download timeout')
$completions += [CompletionResult]::new('--expiry', '--expiry', [CompletionResultType]::ParameterName, 'cache expiry')
$completions += [CompletionResult]::new('--remote-cache-dir', '--remote-cache-dir', [CompletionResultType]::ParameterName, 'cache directory')
$completions += [CompletionResult]::new('--cacert', '--cacert', [CompletionResultType]::ParameterName, 'custom CA certificate')
$completions += [CompletionResult]::new('--cert', '--cert', [CompletionResultType]::ParameterName, 'client certificate')
$completions += [CompletionResult]::new('--cert-key', '--cert-key', [CompletionResultType]::ParameterName, 'client private key')
# Operations
$completions += [CompletionResult]::new('--download', '--download', [CompletionResultType]::ParameterName, 'download remote Taskfile')
$completions += [CompletionResult]::new('--clear-cache', '--clear-cache', [CompletionResultType]::ParameterName, 'clear cache')
}
return $completions.Where{ $_.CompletionText.StartsWith($commandName) }
}
return $(task --list-all --silent) | Where-Object { $_.StartsWith($commandName) } | ForEach-Object { return $_ + " " }
}

View File

@@ -1,25 +1,154 @@
#compdef task
typeset -A opt_args
TASK_CMD="${TASK_EXE:-task}"
compdef _task "$TASK_CMD"
_GO_TASK_COMPLETION_LIST_OPTION="${GO_TASK_COMPLETION_LIST_OPTION:---list-all}"
# Check if an experiment is enabled
function __task_is_experiment_enabled() {
local experiment=$1
task --experiments 2>/dev/null | grep -q "^\* ${experiment}:.*on"
}
# Listing commands from Taskfile.yml
function __list() {
local -a scripts
function __task_list() {
local -a scripts cmd
local -i enabled=0
local taskfile item task desc
if [ -f Taskfile.yml ]; then
scripts=($(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/g'))
_describe 'script' scripts
cmd=($TASK_CMD)
taskfile=${(Qv)opt_args[(i)-t|--taskfile]}
taskfile=${taskfile//\~/$HOME}
for arg in "${words[@]:0:$CURRENT}"; do
if [[ "$arg" = "--" ]]; then
# Use default completion for words after `--` as they are CLI_ARGS.
_default
return 0
fi
done
if [[ -n "$taskfile" && -f "$taskfile" ]]; then
cmd+=(--taskfile "$taskfile")
fi
# Check if global flag is set
if (( ${+opt_args[-g]} || ${+opt_args[--global]} )); then
cmd+=(--global)
fi
if output=$("${cmd[@]}" $_GO_TASK_COMPLETION_LIST_OPTION 2>/dev/null); then
enabled=1
fi
(( enabled )) || return 0
scripts=()
# Read zstyle verbose option (default = true via -T)
local show_desc
zstyle -T ":completion:${curcontext}:" verbose && show_desc=true || show_desc=false
for item in "${(@)${(f)output}[2,-1]#\* }"; do
task="${item%%:[[:space:]]*}"
if [[ "$show_desc" == "true" ]]; then
local desc="${item##[^[:space:]]##[[:space:]]##}"
scripts+=( "${task//:/\\:}:$desc" )
else
scripts+=( "$task" )
fi
done
if [[ "$show_desc" == "true" ]]; then
_describe 'Task to run' scripts
else
compadd -Q -a scripts
fi
}
_arguments \
'(-d --dir)'{-d,--dir}': :_files' \
'(--dry)'--dry \
'(-f --force)'{-f,--force} \
'(-i --init)'{-i,--init} \
'(-l --list)'{-l,--list} \
'(-s --silent)'{-s,--silent} \
'(--status)'--status \
'(-v --verbose)'{-v,--verbose} \
'(--version)'--version \
'(-w --watch)'{-w,--watch} \
'(- *)'{-h,--help} \
'*: :__list' \
_task() {
local -a standard_args operation_args
standard_args=(
'(-C --concurrency)'{-C,--concurrency}'[limit number of concurrent tasks]: '
'(-p --parallel)'{-p,--parallel}'[run command-line tasks in parallel]'
'(-F --failfast)'{-F,--failfast}'[when running tasks in parallel, stop all tasks if one fails]'
'(-f --force)'{-f,--force}'[run even if task is up-to-date]'
'(-c --color)'{-c,--color}'[colored output]'
'(--completion)--completion[generate shell completion script]:shell:(bash zsh fish powershell)'
'(-d --dir)'{-d,--dir}'[dir to run in]:execution dir:_dirs'
'(--disable-fuzzy)--disable-fuzzy[disable fuzzy matching for task names]'
'(-n --dry)'{-n,--dry}'[compiles and prints tasks without executing]'
'(--dry)--dry[dry-run mode, compile and print tasks only]'
'(-x --exit-code)'{-x,--exit-code}'[pass-through exit code of task command]'
'(--experiments)--experiments[list available experiments]'
'(-g --global)'{-g,--global}'[run global Taskfile from home directory]'
'(--insecure)--insecure[allow insecure Taskfile downloads]'
'(-I --interval)'{-I,--interval}'[interval to watch for changes]:duration: '
'(-j --json)'{-j,--json}'[format task list as JSON]'
'(--nested)--nested[nest namespaces when listing as JSON]'
'(--no-status)--no-status[ignore status when listing as JSON]'
'(--interactive)--interactive[prompt for missing required variables]'
'(-o --output)'{-o,--output}'[set output style]:style:(interleaved group prefixed)'
'(--output-group-begin)--output-group-begin[message template before grouped output]:template text: '
'(--output-group-end)--output-group-end[message template after grouped output]:template text: '
'(--output-group-error-only)--output-group-error-only[hide output from successful tasks]'
'(-s --silent)'{-s,--silent}'[disable echoing]'
'(--sort)--sort[set task sorting order]:order:(default alphanumeric none)'
'(--status)--status[exit non-zero if supplied tasks not up-to-date]'
'(--summary)--summary[show summary\: field from tasks instead of running them]'
'(-t --taskfile)'{-t,--taskfile}'[specify a different taskfile]:taskfile:_files'
'(-v --verbose)'{-v,--verbose}'[verbose mode]'
'(-w --watch)'{-w,--watch}'[watch-mode for given tasks, re-run when inputs change]'
'(-y --yes)'{-y,--yes}'[assume yes to all prompts]'
)
# Experimental flags (dynamically added based on enabled experiments)
# Options (modify behavior)
if __task_is_experiment_enabled "GENTLE_FORCE"; then
standard_args+=('(--force-all)--force-all[force execution of task and all dependencies]')
fi
if __task_is_experiment_enabled "REMOTE_TASKFILES"; then
standard_args+=(
'(--offline --download)--offline[use only local or cached Taskfiles]'
'(--timeout)--timeout[timeout for remote Taskfile downloads]:duration: '
'(--expiry)--expiry[cache expiry duration]:duration: '
'(--remote-cache-dir)--remote-cache-dir[directory to cache remote Taskfiles]:cache dir:_dirs'
'(--cacert)--cacert[custom CA certificate for TLS]:file:_files'
'(--cert)--cert[client certificate for mTLS]:file:_files'
'(--cert-key)--cert-key[client certificate private key]:file:_files'
)
fi
operation_args=(
# Task names completion (can be specified multiple times)
'(operation)*: :__task_list'
# Operational args completion (mutually exclusive)
+ '(operation)'
'(*)'{-l,--list}'[list describable tasks]'
'(*)'{-a,--list-all}'[list all tasks]'
'(*)'{-i,--init}'[create new Taskfile.yml]'
'(- *)'{-h,--help}'[show help]'
'(- *)--version[show version and exit]'
)
# Experimental operations (dynamically added based on enabled experiments)
if __task_is_experiment_enabled "REMOTE_TASKFILES"; then
standard_args+=(
'(--offline --clear-cache)--download[download remote Taskfile]'
)
operation_args+=(
'(* --download)--clear-cache[clear remote Taskfile cache]'
)
fi
_arguments -S $standard_args $operation_args
}
# don't run the completion function when being source-ed or eval-ed
if [ "$funcstack[1]" = "_task" ]; then
_task "$@"
fi

25
concurrency.go Normal file
View File

@@ -0,0 +1,25 @@
package task
func (e *Executor) acquireConcurrencyLimit() func() {
if e.concurrencySemaphore == nil {
return emptyFunc
}
e.concurrencySemaphore <- struct{}{}
return func() {
<-e.concurrencySemaphore
}
}
func (e *Executor) releaseConcurrencyLimit() func() {
if e.concurrencySemaphore == nil {
return emptyFunc
}
<-e.concurrencySemaphore
return func() {
e.concurrencySemaphore <- struct{}{}
}
}
func emptyFunc() {}

View File

@@ -1 +0,0 @@
taskfile.dev

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,51 +0,0 @@
# Task
<div align="center">
<img id="logo" src="/Logo.png" height="250px" width="250px" />
</div>
Task is a task runner / build tool that aims to be simpler and easier to use
than, for example, [GNU Make][make].
Since it's written in [Go][go], Task is just a single binary and has no other
dependencies, which means you don't need to mess with any complicated install
setups just to use a build tool.
Once [installed](installation.md), you just need to describe your build tasks
using a simple [YAML][yaml] schema in a file called `Taskfile.yml`:
```yaml
version: '3'
tasks:
hello:
cmds:
- echo 'Hello World from Task!'
silent: true
```
And call it by running `task hello` from you terminal.
The above example is just the start, you can take a look at the [usage](usage.md)
guide to check the full schema documentation and Task features.
## Features
- [Easy installation](installation.md): just download a single binary, add to
$PATH and you're done! Or you can also install using [Homebrew][homebrew],
[Snapcraft][snapcraft], or [Scoop][scoop] if you want;
- Available on CIs: by adding [this simple command](installation.md#install-script)
to install on your CI script and you're done to use Task as part of your CI pipeline;
- Truly cross-platform: while most build tools only work well on Linux or macOS,
Task also supports Windows thanks to [this awesome shell interpreter for Go][sh];
- Great for code generation: you can easily [prevent a task from running](usage.md#prevent-unnecessary-work)
if a given set of files haven't changed since last run (based either on its
timestamp or content).
[make]: https://www.gnu.org/software/make/
[go]: https://golang.org/
[yaml]: http://yaml.org/
[homebrew]: https://brew.sh/
[snapcraft]: https://snapcraft.io/
[scoop]: https://scoop.sh/
[sh]: https://mvdan.cc/sh

View File

@@ -1,17 +0,0 @@
version: '3'
tasks:
install:
desc: Installs docsify to work the on the documentation site
cmds:
- npm install docsify-cli -g
serve:
desc: Serves the documentation site locally
cmds:
- docsify serve .
ico:
desc: Generate favicon.ico from Logo.png
cmds:
- convert -background transparent "Logo.png" -define icon:auto-resize=16,24,32,48,64,72,96,128,256 "favicon.ico"

View File

@@ -1,8 +0,0 @@
- [Installation](installation.md)
- [Usage](usage.md)
- [Styleguide](styleguide.md)
- [Taskfile Versions](taskfile_versions.md)
- [Examples](examples.md)
- [Releasing Task](releasing_task.md)
- [Donate](donate.md)
- [![GitHub](https://icongram.jgog.in/simple/github.svg?color=808080&size=16)GitHub](https://github.com/go-task/task)

View File

@@ -1,35 +0,0 @@
# Donate
If you find this project useful, you can consider donating by using one of the
channels listed below.
This is just a way of saying "thank you", it won't give you any benefits like
higher priority on issues or something similar.
## Open Collective
Task is on [Open Collective](https://opencollective.com/task) and you have
these options to donate:
- [$2 per month](https://opencollective.com/task/contribute/backer-4034/checkout)
- [$5 per month](https://opencollective.com/task/contribute/supporter-8404/checkout)
- [$20 per month](https://opencollective.com/task/contribute/sponsor-4035/checkout)
- [Custom value - One-time donation option supported](https://opencollective.com/task/donate)
## Patreon
I'm also on [Patreon](https://www.patreon.com/andreynering) if
you prefer:
- [$5 per month](https://www.patreon.com/join/andreynering/checkout?rid=4229277)
- [$10 per month](https://www.patreon.com/join/andreynering/checkout?rid=4229276)
- [$15 per month](https://www.patreon.com/join/andreynering/checkout?rid=4229275)
You can choose a custom value on any of the links above.
Patreon does not support one-time donation. As a workaround you can fire a
subscription and cancel it once the donation was succeded.
## PayPal
- [Any value - One-time donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A&currency_code=BRL&source=url)

View File

@@ -1,7 +0,0 @@
# Examples
The [go-task/examples][examples] intends to be a collection of Taskfiles for
various use cases.
(It still lacks many examples, though. Contributions are welcome).
[examples]: https://github.com/go-task/examples

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

View File

@@ -1,45 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Task</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="A task runner / simpler Make alternative written in Go">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-themeable/dist/css/theme-simple.css">
<meta name="google-site-verification" content="VGAYkbdmuaciIDGkBe-eAg9yfZg0C6ostgonbGxxOa0" />
<style>
#logo {
transition: all 0.7s ease;
}
#logo:hover {
-webkit-transform: rotateZ(360deg);
-ms-transform: rotateZ(360deg);
transform: rotateZ(360deg);
}
.app-name-link img {
width: 125px;
}
</style>
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Task',
repo: 'go-task/task',
logo: 'Logo.png',
themeColor: '#29beb0',
loadSidebar: true,
auto2top: true,
maxLevel: 3,
subMaxLevel: 3
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-themeable/dist/js/docsify-themeable.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-tabs"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-yaml.min.js"></script>
</body>
</html>

View File

@@ -1,142 +0,0 @@
# Installation
Task offers many installation methods. Check out the available methods below.
## Package Managers
<!-- tabs:start -->
#### **Homebrew**
If you're on macOS or Linux and have [Homebrew][homebrew] installed, getting
Task is as simple as running:
```bash
brew install go-task/tap/go-task
```
#### **Snap**
Task is available in [Snapcraft][snapcraft], but keep in mind that your
Linux distribution should allow classic confinement for Snaps to Task work
right:
```bash
sudo snap install task --classic
```
#### **Scoop**
If you're on Windows and have [Scoop][scoop] installed, use `extras` bucket
to install Task like:
```cmd
scoop bucket add extras
scoop install task
```
This installation method is community owned. After a new release of Task, it
may take some time until it's available on Scoop.
#### **AUR**
If you're on Arch Linux you can install Task from
[AUR](https://aur.archlinux.org/packages/taskfile-git) using your favorite
package manager such as `yay`, `pacaur` or `yaourt`:
```cmd
yay -S taskfile-git
```
This installation method is community owned, but since it's `-git` version of
the package, it's always latest available version based on the Git repository.
<!-- tabs:end -->
## Get The Binary
<!-- tabs:start -->
#### **Binary**
You can download the binary from the [releases page on GitHub][releases] and
add to your `$PATH`.
DEB and RPM packages are also available.
The `task_checksums.txt` file contains the SHA-256 checksum for each file.
#### **Install Script**
We also have a [install script][installscript], which is very useful on
scenarios like CIs. Many thanks to [GoDownloader][godownloader] for allowing
easily generating this script.
```bash
# For Default Installion to ./bin with debug logging
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
# For Installation To /usr/local/bin for userwide access with debug logging
# May require sudo sh
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
```
> This method will download the binary on the local `./bin` directory by default.
#### **GitHub Actions**
If you want to install Task in GitHub Actions you can try using
[this action](https://github.com/arduino/actions/tree/master/setup-taskfile)
by the Arduino team:
```yaml
- name: Install Task
uses: Arduino/actions/setup-taskfile@master
```
This installation method is community owned.
<!-- tabs:end -->
## Build From Source
<!-- tabs:start -->
#### **Go Modules**
First, make sure you have [Go][go] properly installed and setup.
You can easily install it globally by running:
```bash
go get -u github.com/go-task/task/v3/cmd/task
```
Or you can install into another directory:
```bash
git clone https://github.com/go-task/task
cd task
# Compiling binary to $GOPATH/bin
go install -v ./cmd/task
# Compiling it to another location.
# Use -o ./task.exe on Windows.
go build -v -o ./task ./cmd/task
```
> For CI environments we recommend using the [Install Script](#get-the-binary)
> instead, which is faster and more stable, since it'll just download the latest
> released binary, instead of compiling the edge (master branch) version.
<!-- tabs:end -->
[go]: https://golang.org/
[snapcraft]: https://snapcraft.io/task
[homebrew]: https://brew.sh/
[installscript]: https://github.com/go-task/task/blob/master/install-task.sh
[releases]: https://github.com/go-task/task/releases
[godownloader]: https://github.com/goreleaser/godownloader
[scoop]: https://scoop.sh/

View File

@@ -1,39 +0,0 @@
# Releasing Task
The release process of Task is done with the help of
[GoReleaser][goreleaser]. You can test the release process locally by calling
the `test-release` task of the Taskfile.
[GitHub Actions](https://github.com/go-task/task/actions) should release
artifacts automatically when a new Git tag is pushed to master
(raw executables and DEB and RPM packages).
# Homebrew
To release a new version on the [Homebrew tap][homebrewtap] edit the
[Formula/go-task.rb][gotaskrb] file, updating with the new version, download
URL and sha256.
# Snapcraft
The exception is the publishing of a new version of the
[snap package][snappackage]. This current require two steps after publishing
the binaries:
* Updating the current version on [snapcraft.yaml][snapcraftyaml];
* Moving both `i386` and `amd64` new artifacts to the stable channel on
the [Snapcraft dashboard][snapcraftdashboard]
# Scoop
Scoop is a community owned installation method. Scoop owners usually take care
of updating versions there by editing
[this file](https://github.com/lukesampson/scoop-extras/blob/master/bucket/task.json).
If you think its Task version is outdated, open an issue to let us know.
[goreleaser]: https://goreleaser.com/#continuous_integration
[homebrewtap]: https://github.com/go-task/homebrew-tap
[gotaskrb]: https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb
[snappackage]: https://github.com/go-task/snap
[snapcraftyaml]: https://github.com/go-task/snap/blob/master/snap/snapcraft.yaml#L2
[snapcraftdashboard]: https://dashboard.snapcraft.io/

View File

@@ -1,225 +0,0 @@
# Taskfile Versions
The Taskfile syntax and features changed with time. This document explains what
changed on each version and how to upgrade your Taskfile.
## What the Taskfile version mean
The Taskfile version follows the Task version. E.g. the change to Taskfile
version `2` means that Task `v2.0.0` should be release to support it.
The `version:` key on Taskfile accepts a semver string, so either `2`, `2.0` or
`2.0.0` is accepted. If you choose to use `2.0` Task will not enable future
`2.1` features, but if you choose to use `2`, then any `2.x.x` features will be
available, but not `3.0.0+`.
## Version 1
> NOTE: Taskfiles in version 1 are not supported on Task >= v3.0.0 anymore.
In the first version of the `Taskfile`, the `version:` key was not available,
because the tasks was in the root of the YAML document. Like this:
```yaml
echo:
cmds:
- echo "Hello, World!"
```
The variable priority order was also different:
1. Call variables
2. Environment
3. Task variables
4. `Taskvars.yml` variables
## Version 2.0
At version 2, we introduced the `version:` key, to allow us to evolve Task
with new features without breaking existing Taskfiles. The new syntax is as
follows:
```yaml
version: '2'
tasks:
echo:
cmds:
- echo "Hello, World!"
```
Version 2 allows you to write global variables directly in the Taskfile,
if you don't want to create a `Taskvars.yml`:
```yaml
version: '2'
vars:
GREETING: Hello, World!
tasks:
greet:
cmds:
- echo "{{.GREETING}}"
```
The variable priority order changed to the following:
1. Task variables
2. Call variables
3. Taskfile variables
4. Taskvars file variables
5. Environment variables
A new global option was added to configure the number of variables expansions
(which default to 2):
```yaml
version: '2'
expansions: 3
vars:
FOO: foo
BAR: bar
BAZ: baz
FOOBAR: "{{.FOO}}{{.BAR}}"
FOOBARBAZ: "{{.FOOBAR}}{{.BAZ}}"
tasks:
default:
cmds:
- echo "{{.FOOBARBAZ}}"
```
## Version 2.1
Version 2.1 includes a global `output` option, to allow having more control
over how commands output are printed to the console
(see [documentation][output] for more info):
```yaml
version: '2'
output: prefixed
tasks:
server:
cmds:
- go run main.go
prefix: server
```
From this version it's also possible to ignore errors of a command or task
(check documentation [here][ignore_errors]):
```yaml
version: '2'
tasks:
example-1:
cmds:
- cmd: exit 1
ignore_error: true
- echo "This will be print"
example-2:
cmds:
- exit 1
- echo "This will be print"
ignore_error: true
```
## Version 2.2
Version 2.2 comes with a global `includes` options to include other
Taskfiles:
```yaml
version: '2'
includes:
docs: ./documentation # will look for ./documentation/Taskfile.yml
docker: ./DockerTasks.yml
```
## Version 2.6
Version 2.6 comes with `preconditions` stanza in tasks.
```yaml
version: '2'
tasks:
upload_environment:
preconditions:
- test -f .env
cmds:
- aws s3 cp .env s3://myenvironment
```
Please check the [documentation][includes]
[output]: usage.md#output-syntax
[ignore_errors]: usage.md#ignore-errors
[includes]: usage.md#including-other-taskfiles
## Version 3
These are some major changes done on `v3`:
- Task's output will now be colored
- Added support for `.env` like files
- Added `label:` setting to task so one can override how the task name
appear in the logs
- A global `method:` was added to allow setting the default method,
and Task's default changed to `checksum`
- Two magic variables were added when using `status:`: `CHECKSUM` and
`TIMESTAMP` which contains, respectively, the md5 checksum and greatest
modification timestamp of the files listed on `sources:`
- Also, the `TASK` variable is always available with the current task name
- CLI variables are always treated as global variables
- Added `dir:` option to `includes` to allow choosing on which directory an
included Taskfile will run:
```yaml
includes:
docs:
taskfile: ./docs
dir: ./docs
```
- Implemented short task syntax. All below syntaxes are equivalent:
```yaml
version: '3'
tasks:
print:
cmds:
- echo "Hello, World!"
```
```yaml
version: '3'
tasks:
print:
- echo "Hello, World!"
```
```yaml
version: '3'
tasks:
print: echo "Hello, World!"
```
- There was a major refactor on how variables are handled. They're now easier
to understand. The `expansions:` 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.
- Environment variables
- Global + CLI variables
- Call variables
- Task variables

View File

@@ -1,888 +0,0 @@
# Usage
## Getting started
Create a file called `Taskfile.yml` in the root of your project.
The `cmds` attribute should contain the commands of a task.
The example below allows compiling a Go app and uses [Minify][minify] to concat
and minify multiple CSS files into a single one.
```yaml
version: '3'
tasks:
build:
cmds:
- go build -v -i main.go
assets:
cmds:
- minify -o public/style.css src/css
```
Running the tasks is as simple as running:
```bash
task assets build
```
Task uses [github.com/mvdan/sh](https://github.com/mvdan/sh), a native Go sh
interpreter. So you can write sh/bash commands and it will work even on
Windows, where `sh` or `bash` are usually not available. Just remember any
executable called must be available by the OS or in PATH.
If you omit a task name, "default" will be assumed.
## Environment variables
### Task
You can use `env` to set custom environment variables for a specific task:
```yaml
version: '3'
tasks:
greet:
cmds:
- echo $GREETING
env:
GREETING: Hey, there!
```
Additionally, you can set globally environment variables, that'll be available
to all tasks:
```yaml
version: '3'
env:
GREETING: Hey, there!
tasks:
greet:
cmds:
- echo $GREETING
```
> NOTE: `env` supports expansion and retrieving output from a shell command
> just like variables, as you can see on the [Variables](#variables) section.
### .env files
You can also ask Task to include `.env` like files by using the `dotenv:`
setting:
```
# .env
KEYNAME=VALUE
```
```yaml
# Taskfile.yml
version: '3'
dotenv: ['.env']
tasks:
greet:
cmds:
- echo "Using $KEYNAME"
```
## Including other Taskfiles
If you want to share tasks between different projects (Taskfiles), you can use
the importing mechanism to include other Taskfiles using the `includes` keyword:
```yaml
version: '3'
includes:
docs: ./documentation # will look for ./documentation/Taskfile.yml
docker: ./DockerTasks.yml
```
The tasks described in the given Taskfiles will be available with the informed
namespace. So, you'd call `task docs:serve` to run the `serve` task from
`documentation/Taskfile.yml` or `task docker:build` to run the `build` task
from the `DockerTasks.yml` file.
### OS-specific Taskfiles
With `version: '2'`, task automatically includes any `Taskfile_{{OS}}.yml`
if it exists (for example: `Taskfile_windows.yml`, `Taskfile_linux.yml` or
`Taskfile_darwin.yml`). Since this behavior was a bit too implicit, it
was removed on version 3, but you still can have a similar behavior by
explicitly importing these files:
```yaml
version: '3'
includes:
build: ./Taskfile_{{OS}}.yml
```
### Directory of included Taskfile
By default, included Taskfile's tasks are ran in the current directory, even
if the Taskfile is in another directory, but you can force its tasks to run
in another directory by using this alternative syntax:
```yaml
version: '3'
includes:
docs:
taskfile: ./docs/Taskfile.yml
dir: ./docs
```
> The included Taskfiles must be using the same schema version the main
> Taskfile uses.
> Also, for now included Taskfiles can't include other Taskfiles.
> This was a deliberate decision to keep use and implementation simple.
> If you disagree, open an GitHub issue and explain your use case. =)
## Task directory
By default, tasks will be executed in the directory where the Taskfile is
located. But you can easily make the task run in another folder informing
`dir`:
```yaml
version: '3'
tasks:
serve:
dir: public/www
cmds:
# run http server
- caddy
```
If the directory doesn't exist, `task` creates it.
## Task dependencies
> Dependencies run in parallel, so dependencies of a task shouldn't depend one
> another. If you want to force tasks to run serially take a look at the
> [Calling Another Task](#calling-another-task) section below.
You may have tasks that depend on others. Just pointing them on `deps` will
make them run automatically before running the parent task:
```yaml
version: '3'
tasks:
build:
deps: [assets]
cmds:
- go build -v -i main.go
assets:
cmds:
- minify -o public/style.css src/css
```
In the above example, `assets` will always run right before `build` if you run
`task build`.
A task can have only dependencies and no commands to group tasks together:
```yaml
version: '3'
tasks:
assets:
deps: [js, css]
js:
cmds:
- minify -o public/script.js src/js
css:
cmds:
- minify -o public/style.css src/css
```
If there is more than one dependency, they always run in parallel for better
performance.
> You can also make the tasks given by the command line run in parallel by
> using the `--parallel` flag (alias `-p`). Example: `task --parallel js css`.
If you want to pass information to dependencies, you can do that the same
manner as you would to [call another task](#calling-another-task):
```yaml
version: '3'
tasks:
default:
deps:
- task: echo_sth
vars: {TEXT: "before 1"}
- task: echo_sth
vars: {TEXT: "before 2"}
cmds:
- echo "after"
echo_sth:
cmds:
- echo {{.TEXT}}
```
## Calling another task
When a task has many dependencies, they are executed concurrently. This will
often result in a faster build pipeline. But in some situations you may need
to call other tasks serially. In this case, just use the following syntax:
```yaml
version: '3'
tasks:
main-task:
cmds:
- task: task-to-be-called
- task: another-task
- echo "Both done"
task-to-be-called:
cmds:
- echo "Task to be called"
another-task:
cmds:
- echo "Another task"
```
Overriding variables in the called task is as simple as informing `vars`
attribute:
```yaml
version: '3'
tasks:
greet:
vars:
RECIPIENT: '{{default "World" .RECIPIENT}}'
cmds:
- echo "Hello, {{.RECIPIENT}}!"
greet-pessimistically:
cmds:
- task: greet
vars: {RECIPIENT: "Cruel World"}
```
The above syntax is also supported in `deps`.
> NOTE: If you want to call a task declared in the root Taskfile from within an
> [included Taskfile](#including-other-taskfiles), add a leading `:` like this:
> `task: :task-name`.
## Prevent unnecessary work
### By fingerprinting locally generated files and their sources
If a task generates something, you can inform Task the source and generated
files, so Task will prevent to run them if not necessary.
```yaml
version: '3'
tasks:
build:
deps: [js, css]
cmds:
- go build -v -i main.go
js:
cmds:
- minify -o public/script.js src/js
sources:
- src/js/**/*.js
generates:
- public/script.js
css:
cmds:
- minify -o public/style.css src/css
sources:
- src/css/**/*.css
generates:
- public/style.css
```
`sources` and `generates` can be files or file patterns. When given,
Task will compare the checksum of the source files to determine if it's
necessary to run the task. If not, it will just print a message like
`Task "js" is up to date`.
You will probably want to ignore the `.task` folder in your `.gitignore` file
(It's there that Task stores the last checksum).
If you prefer this check to be made by the modification timestamp of the files,
instead of its checksum (content), just set the `method` property to `timestamp`.
```yaml
version: '3'
tasks:
build:
cmds:
- go build .
sources:
- ./*.go
generates:
- app{{exeExt}}
method: checksum
```
> TIP: method `none` skips any validation and always run the task.
> NOTE: for the `checksum` (default) method to work, it's only necessary to
> inform the source files, but if you want to use the `timestamp` method, you
> also need to inform the generated files with `generates`.
### Using programmatic checks to indicate a task is up to date.
Alternatively, you can inform a sequence of tests as `status`. If no error
is returned (exit status 0), the task is considered up-to-date:
```yaml
version: '3'
tasks:
generate-files:
cmds:
- mkdir directory
- touch directory/file1.txt
- touch directory/file2.txt
# test existence of files
status:
- test -d directory
- test -f directory/file1.txt
- test -f directory/file2.txt
```
Normally, you would use `sources` in combination with
`generates` - but for tasks that generate remote artifacts (Docker images,
deploys, CD releases) the checksum source and timestamps require either
access to the artifact or for an out-of-band refresh of the `.checksum`
fingerprint file.
Two special variables `{{.CHECKSUM}}` and `{{.TIMESTAMP}}` are available
for interpolation within `status` commands, depending on the method assigned
to fingerprint the sources. Only `source` globs are fingerprinted.
Note that the `{{.TIMESTAMP}}` variable is a "live" Go `time.Time` struct, and
can be formatted using any of the methods that `time.Time` responds to.
See [the Go Time documentation](https://golang.org/pkg/time/) for more information.
You can use `--force` or `-f` if you want to force a task to run even when
up-to-date.
Also, `task --status [tasks]...` will exit with a non-zero exit code if any of
the tasks are not up-to-date.
### Using programmatic checks to cancel execution of an task and it's dependencies
In addition to `status` checks, there are also `preconditions` checks, which are
the logical inverse of `status` checks. That is, if you need a certain set of
conditions to be _true_ you can use the `preconditions` stanza.
`preconditions` are similar to `status` lines except they support `sh`
expansion and they SHOULD all return 0.
```yaml
version: '3'
tasks:
generate-files:
cmds:
- mkdir directory
- touch directory/file1.txt
- touch directory/file2.txt
# test existence of files
preconditions:
- test -f .env
- sh: "[ 1 = 0 ]"
msg: "One doesn't equal Zero, Halting"
```
Preconditions can set specific failure messages that can tell
a user what steps to take using the `msg` field.
If a task has a dependency on a sub-task with a precondition, and that
precondition is not met - the calling task will fail. Note that a task
executed with a failing precondition will not run unless `--force` is
given.
Unlike `status` which will skip a task if it is up to date, and continue
executing tasks that depend on it, a `precondition` will fail a task, along
with any other tasks that depend on it.
```yaml
version: '3'
tasks:
task-will-fail:
preconditions:
- sh: "exit 1"
task-will-also-fail:
deps:
- task-will-fail
task-will-still-fail:
cmds:
- task: task-will-fail
- echo "I will not run"
```
## Variables
When doing interpolation of variables, Task will look for the below.
They are listed below in order of importance (e.g. most important first):
- Variables declared in the task definition
- Variables given while calling a task from another
(See [Calling another task](#calling-another-task) above)
- Global variables (those declared in the `vars:` option in the Taskfile)
- Environment variables
Example of sending parameters with environment variables:
```bash
$ TASK_VARIABLE=a-value task do-something
```
> TIP: A special variable `.TASK` is always available containing the task name.
Since some shells don't support above syntax to set environment variables
(Windows) tasks also accepts a similar style when not in the beginning of
the command.
```bash
$ task write-file FILE=file.txt "CONTENT=Hello, World!" print "MESSAGE=All done!"
```
Example of locally declared vars:
```yaml
version: '3'
tasks:
print-var:
cmds:
- echo "{{.VAR}}"
vars:
VAR: Hello!
```
Example of global vars in a `Taskfile.yml`:
```yaml
version: '3'
vars:
GREETING: Hello from Taskfile!
tasks:
greet:
cmds:
- echo "{{.GREETING}}"
```
### Dynamic variables
The below syntax (`sh:` prop in a variable) is considered a dynamic variable.
The value will be treated as a command and the output assigned. If there is one
or more trailing newlines, the last newline will be trimmed.
```yaml
version: '3'
tasks:
build:
cmds:
- go build -ldflags="-X main.Version={{.GIT_COMMIT}}" main.go
vars:
GIT_COMMIT:
sh: git log -n 1 --format=%h
```
This works for all types of variables.
## Go's template engine
Task parse commands as [Go's template engine][gotemplate] before executing
them. Variables are accessible through dot syntax (`.VARNAME`).
All functions by the Go's [slim-sprig lib](https://go-task.github.io/slim-sprig/)
are available. The following example gets the current date in a given format:
```yaml
version: '3'
tasks:
print-date:
cmds:
- echo {{now | date "2006-01-02"}}
```
Task also adds the following functions:
- `OS`: Returns operating system. Possible values are "windows", "linux",
"darwin" (macOS) and "freebsd".
- `ARCH`: return the architecture Task was compiled to: "386", "amd64", "arm"
or "s390x".
- `splitLines`: Splits Unix (\n) and Windows (\r\n) styled newlines.
- `catLines`: Replaces Unix (\n) and Windows (\r\n) styled newlines with a space.
- `toSlash`: Does nothing on Unix, but on Windows converts a string from `\`
path format to `/`.
- `fromSlash`: Opposite of `toSlash`. Does nothing on Unix, but on Windows
converts a string from `\` path format to `/`.
- `exeExt`: Returns the right executable extension for the current OS
(`".exe"` for Windows, `""` for others).
Example:
```yaml
version: '3'
tasks:
print-os:
cmds:
- echo '{{OS}} {{ARCH}}'
- echo '{{if eq OS "windows"}}windows-command{{else}}unix-command{{end}}'
# This will be path/to/file on Unix but path\to\file on Windows
- echo '{{fromSlash "path/to/file"}}'
enumerated-file:
vars:
CONTENT: |
foo
bar
cmds:
- |
cat << EOF > output.txt
{{range $i, $line := .CONTENT | splitLines -}}
{{printf "%3d" $i}}: {{$line}}
{{end}}EOF
```
## Help
Running `task --list` (or `task -l`) lists all tasks with a description.
The following Taskfile:
```yaml
version: '3'
tasks:
build:
desc: Build the go binary.
cmds:
- go build -v -i main.go
test:
desc: Run all the go tests.
cmds:
- go test -race ./...
js:
cmds:
- minify -o public/script.js src/js
css:
cmds:
- minify -o public/style.css src/css
```
would print the following output:
```bash
* build: Build the go binary.
* test: Run all the go tests.
```
## Display summary of task
Running `task --summary task-name` will show a summary of a task.
The following Taskfile:
```yaml
version: '3'
tasks:
release:
deps: [build]
summary: |
Release your project to github
It will build your project before starting the release.
Please make sure that you have set GITHUB_TOKEN before starting.
cmds:
- your-release-tool
build:
cmds:
- your-build-tool
```
with running ``task --summary release`` would print the following output:
```
task: release
Release your project to github
It will build your project before starting the release.
Please make sure that you have set GITHUB_TOKEN before starting.
dependencies:
- build
commands:
- your-release-tool
```
If a summary is missing, the description will be printed.
If the task does not have a summary or a description, a warning is printed.
Please note: *showing the summary will not execute the command*.
## Overriding task name
Sometimes you may want to override the task name print on summary, up-to-date
messages to STDOUT, etc. In this case you can just set `label:`, which can also
be interpolated with variables:
```yaml
version: '3'
tasks:
default:
- task: print
vars:
MESSAGE: hello
- task: print
vars:
MESSAGE: world
print:
label: 'print-{{.MESSAGE}}'
cmds:
- echo "{{.MESSAGE}}"
```
## Silent mode
Silent mode disables echoing of commands before Task runs it.
For the following Taskfile:
```yaml
version: '3'
tasks:
echo:
cmds:
- echo "Print something"
```
Normally this will be print:
```sh
echo "Print something"
Print something
```
With silent mode on, the below will be print instead:
```sh
Print something
```
There are four ways to enable silent mode:
* At command level:
```yaml
version: '3'
tasks:
echo:
cmds:
- cmd: echo "Print something"
silent: true
```
* At task level:
```yaml
version: '3'
tasks:
echo:
cmds:
- echo "Print something"
silent: true
```
* Globally at Taskfile level:
```yaml
version: '3'
silent: true
tasks:
echo:
cmds:
- echo "Print something"
```
* Or globally with `--silent` or `-s` flag
If you want to suppress STDOUT instead, just redirect a command to `/dev/null`:
```yaml
version: '3'
tasks:
echo:
cmds:
- echo "This will print nothing" > /dev/null
```
## Dry run mode
Dry run mode (`--dry`) compiles and steps through each task, printing the commands
that would be run without executing them. This is useful for debugging your Taskfiles.
## Ignore errors
You have the option to ignore errors during command execution.
Given the following Taskfile:
```yaml
version: '3'
tasks:
echo:
cmds:
- exit 1
- echo "Hello World"
```
Task will abort the execution after running `exit 1` because the status code `1` stands for `EXIT_FAILURE`.
However it is possible to continue with execution using `ignore_error`:
```yaml
version: '3'
tasks:
echo:
cmds:
- cmd: exit 1
ignore_error: true
- echo "Hello World"
```
`ignore_error` can also be set for a task, which mean errors will be suppressed
for all commands. But keep in mind this option won't propagate to other tasks
called either by `deps` or `cmds`!
## Output syntax
By default, Task just redirect the STDOUT and STDERR of the running commands
to the shell in real time. This is good for having live feedback for log
printed by commands, but the output can become messy if you have multiple
commands running at the same time and printing lots of stuff.
To make this more customizable, there are currently three different output
options you can choose:
- `interleaved` (default)
- `group`
- `prefixed`
To choose another one, just set it to root in the Taskfile:
```yaml
version: '3'
output: 'group'
tasks:
# ...
```
The `group` output will print the entire output of a command once, after it
finishes, so you won't have live feedback for commands that take a long time
to run.
The `prefix` output will prefix every line printed by a command with
`[task-name] ` as the prefix, but you can customize the prefix for a command
with the `prefix:` attribute:
```yaml
version: '3'
output: prefixed
tasks:
default:
deps:
- task: print
vars: {TEXT: foo}
- task: print
vars: {TEXT: bar}
- task: print
vars: {TEXT: baz}
print:
cmds:
- echo "{{.TEXT}}"
prefix: "print-{{.TEXT}}"
silent: true
```
```bash
$ task default
[print-foo] foo
[print-bar] bar
[print-baz] baz
```
> The `output` option can also be specified by the `--output` or `-o` flags.
## Short task syntax
Starting on Task v3, you can now write tasks with a shorter syntax if they
have the default settings (e.g. no custom `env:`, `vars:`, `desc:`, `silent:` , etc):
```yaml
version: '3'
tasks:
build: go build -v -o ./app{{exeExt}} .
run:
- task: build
- ./app{{exeExt}} -h localhost -p 8080
```
## Watch tasks
With the flags `--watch` or `-w` task will watch for file changes
and run the task again. This requires the `sources` attribute to be given,
so task knows which files to watch.
[gotemplate]: https://golang.org/pkg/text/template/
[minify]: https://github.com/tdewolff/minify/tree/master/cmd/minify

View File

@@ -1,43 +0,0 @@
package task
import (
"errors"
"fmt"
)
var (
// ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists
ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists")
)
type taskNotFoundError struct {
taskName string
}
func (err *taskNotFoundError) Error() string {
return fmt.Sprintf(`task: Task "%s" not found`, err.taskName)
}
type taskRunError struct {
taskName string
err error
}
func (err *taskRunError) Error() string {
return fmt.Sprintf(`task: Failed to run task "%s": %v`, err.taskName, err.err)
}
// MaximumTaskCallExceededError is returned when a task is called too
// many times. In this case you probably have a cyclic dependendy or
// infinite loop
type MaximumTaskCallExceededError struct {
task string
}
func (e *MaximumTaskCallExceededError) Error() string {
return fmt.Sprintf(
`task: maximum task call exceeded (%d) for task "%s": probably an cyclic dep or infinite loop`,
MaximumTaskCall,
e.task,
)
}

View File

@@ -0,0 +1,127 @@
package errors
import (
"bytes"
"cmp"
"errors"
"fmt"
"strings"
"github.com/fatih/color"
"go.yaml.in/yaml/v3"
)
type (
TaskfileDecodeError struct {
Message string
Location string
Line int
Column int
Tag string
Snippet string
Err error
}
)
func NewTaskfileDecodeError(err error, node *yaml.Node) *TaskfileDecodeError {
// If the error is already a DecodeError, return it
taskfileInvalidErr := &TaskfileDecodeError{}
if errors.As(err, &taskfileInvalidErr) {
return taskfileInvalidErr
}
return &TaskfileDecodeError{
Line: node.Line,
Column: node.Column,
Tag: node.ShortTag(),
Err: err,
}
}
func (err *TaskfileDecodeError) Error() string {
buf := &bytes.Buffer{}
// Print the error message
if err.Message != "" {
fmt.Fprintln(buf, color.RedString("err: %s", err.Message))
} else {
// Extract the errors from the TypeError
te := &yaml.TypeError{}
if errors.As(err.Err, &te) {
if len(te.Errors) > 1 {
fmt.Fprintln(buf, color.RedString("errs:"))
for _, message := range te.Errors {
fmt.Fprintln(buf, color.RedString("- %s", message))
}
} else {
fmt.Fprintln(buf, color.RedString("err: %s", te.Errors[0]))
}
} else {
// Otherwise print the error message normally
fmt.Fprintln(buf, color.RedString("err: %s", err.Err))
}
}
fmt.Fprintln(buf, color.RedString("file: %s:%d:%d", err.Location, err.Line, err.Column))
fmt.Fprint(buf, err.Snippet)
return buf.String()
}
func (err *TaskfileDecodeError) Debug() string {
const indentWidth = 2
buf := &bytes.Buffer{}
fmt.Fprintln(buf, "TaskfileDecodeError:")
// Recursively loop through the error chain and print any details
var debug func(error, int)
debug = func(err error, indent int) {
indentStr := strings.Repeat(" ", indent*indentWidth)
// Nothing left to unwrap
if err == nil {
fmt.Fprintf(buf, "%sEnd of chain\n", indentStr)
return
}
// Taskfile decode error
decodeErr := &TaskfileDecodeError{}
if errors.As(err, &decodeErr) {
fmt.Fprintf(buf, "%s%s (%s:%d:%d)\n",
indentStr,
cmp.Or(decodeErr.Message, "<no_message>"),
decodeErr.Location,
decodeErr.Line,
decodeErr.Column,
)
debug(errors.Unwrap(err), indent+1)
return
}
fmt.Fprintf(buf, "%s%s\n", indentStr, err)
debug(errors.Unwrap(err), indent+1)
}
debug(err, 0)
return buf.String()
}
func (err *TaskfileDecodeError) Unwrap() error {
return err.Err
}
func (err *TaskfileDecodeError) Code() int {
return CodeTaskfileDecode
}
func (err *TaskfileDecodeError) WithMessage(format string, a ...any) *TaskfileDecodeError {
err.Message = fmt.Sprintf(format, a...)
return err
}
func (err *TaskfileDecodeError) WithTypeMessage(t string) *TaskfileDecodeError {
err.Message = fmt.Sprintf("cannot unmarshal %s into %s", err.Tag, t)
return err
}
func (err *TaskfileDecodeError) WithFileInfo(location string, snippet string) *TaskfileDecodeError {
err.Location = location
err.Snippet = snippet
return err
}

72
errors/errors.go Normal file
View File

@@ -0,0 +1,72 @@
package errors
import "errors"
// General exit codes
const (
CodeOk int = iota // Used when the program exits without errors
CodeUnknown // Used when no other exit code is appropriate
)
// TaskRC related exit codes
const (
CodeTaskRCNotFoundError int = iota + 50
)
// Taskfile related exit codes
const (
CodeTaskfileNotFound int = iota + 100
CodeTaskfileAlreadyExists
CodeTaskfileDecode
CodeTaskfileFetchFailed
CodeTaskfileNotTrusted
CodeTaskfileNotSecure
CodeTaskfileCacheNotFound
CodeTaskfileVersionCheckError
CodeTaskfileNetworkTimeout
CodeTaskfileInvalid
CodeTaskfileCycle
CodeTaskfileDoesNotMatchChecksum
)
// Task related exit codes
const (
CodeTaskNotFound int = iota + 200
CodeTaskRunError
CodeTaskInternal
CodeTaskNameConflict
CodeTaskCalledTooManyTimes
CodeTaskCancelled
CodeTaskMissingRequiredVars
CodeTaskNotAllowedVars
)
// TaskError extends the standard error interface with a Code method. This code will
// be used as the exit code of the program which allows the user to distinguish
// between different types of errors.
type TaskError interface {
error
Code() int
}
// New returns an error that formats as the given text. Each call to New returns
// a distinct error value even if the text is identical. This wraps the standard
// errors.New function so that we don't need to alias that package.
func New(text string) error {
return errors.New(text)
}
// Is wraps the standard errors.Is function so that we don't need to alias that package.
func Is(err, target error) bool {
return errors.Is(err, target)
}
// As wraps the standard errors.As function so that we don't need to alias that package.
func As(err error, target any) bool {
return errors.As(err, target)
}
// Unwrap wraps the standard errors.Unwrap function so that we don't need to alias that package.
func Unwrap(err error) error {
return errors.Unwrap(err)
}

208
errors/errors_task.go Normal file
View File

@@ -0,0 +1,208 @@
package errors
import (
"errors"
"fmt"
"strings"
"mvdan.cc/sh/v3/interp"
)
// TaskNotFoundError is returned when the specified task is not found in the
// Taskfile.
type TaskNotFoundError struct {
TaskName string
DidYouMean string
}
func (err *TaskNotFoundError) Error() string {
if err.DidYouMean != "" {
return fmt.Sprintf(
`task: Task %q does not exist. Did you mean %q?`,
err.TaskName,
err.DidYouMean,
)
}
return fmt.Sprintf(`task: Task %q does not exist`, err.TaskName)
}
func (err *TaskNotFoundError) Code() int {
return CodeTaskNotFound
}
// TaskRunError is returned when a command in a task returns a non-zero exit
// code.
type TaskRunError struct {
TaskName string
Err error
}
func (err *TaskRunError) Error() string {
return fmt.Sprintf(`task: Failed to run task %q: %v`, err.TaskName, err.Err)
}
func (err *TaskRunError) Code() int {
return CodeTaskRunError
}
func (err *TaskRunError) TaskExitCode() int {
var exit interp.ExitStatus
if errors.As(err.Err, &exit) {
return int(exit)
}
return err.Code()
}
func (err *TaskRunError) Unwrap() error {
return err.Err
}
// TaskInternalError when the user attempts to invoke a task that is internal.
type TaskInternalError struct {
TaskName string
}
func (err *TaskInternalError) Error() string {
return fmt.Sprintf(`task: Task "%s" is internal`, err.TaskName)
}
func (err *TaskInternalError) Code() int {
return CodeTaskInternal
}
// TaskNameConflictError is returned when multiple tasks with a matching name or
// alias are found.
type TaskNameConflictError struct {
Call string
TaskNames []string
}
func (err *TaskNameConflictError) Error() string {
return fmt.Sprintf(`task: Found multiple tasks (%s) that match %q`, strings.Join(err.TaskNames, ", "), err.Call)
}
func (err *TaskNameConflictError) Code() int {
return CodeTaskNameConflict
}
type TaskNameFlattenConflictError struct {
TaskName string
Include string
}
func (err *TaskNameFlattenConflictError) Error() string {
return fmt.Sprintf(`task: Found multiple tasks (%s) included by "%s""`, err.TaskName, err.Include)
}
func (err *TaskNameFlattenConflictError) Code() int {
return CodeTaskNameConflict
}
// TaskCalledTooManyTimesError is returned when the maximum task call limit is
// exceeded. This is to prevent infinite loops and cyclic dependencies.
type TaskCalledTooManyTimesError struct {
TaskName string
MaximumTaskCall int
}
func (err *TaskCalledTooManyTimesError) Error() string {
return fmt.Sprintf(
`task: Maximum task call exceeded (%d) for task %q: probably an cyclic dep or infinite loop`,
err.MaximumTaskCall,
err.TaskName,
)
}
func (err *TaskCalledTooManyTimesError) Code() int {
return CodeTaskCalledTooManyTimes
}
// TaskCancelledByUserError is returned when the user does not accept an optional prompt to continue.
type TaskCancelledByUserError struct {
TaskName string
}
func (err *TaskCancelledByUserError) Error() string {
return fmt.Sprintf(`task: Task %q cancelled by user`, err.TaskName)
}
func (err *TaskCancelledByUserError) Code() int {
return CodeTaskCancelled
}
// TaskCancelledNoTerminalError is returned when trying to run a task with a prompt in a non-terminal environment.
type TaskCancelledNoTerminalError struct {
TaskName string
}
func (err *TaskCancelledNoTerminalError) Error() string {
return fmt.Sprintf(
`task: Task %q cancelled because it has a prompt and the environment is not a terminal. Use --yes (-y) to run anyway.`,
err.TaskName,
)
}
func (err *TaskCancelledNoTerminalError) Code() int {
return CodeTaskCancelled
}
// TaskMissingRequiredVarsError is returned when a task is missing required variables.
type MissingVar struct {
Name string
AllowedValues []string
}
type TaskMissingRequiredVarsError struct {
TaskName string
MissingVars []MissingVar
}
func (v MissingVar) String() string {
if len(v.AllowedValues) == 0 {
return v.Name
}
return fmt.Sprintf("%s (allowed values: %v)", v.Name, v.AllowedValues)
}
func (err *TaskMissingRequiredVarsError) Error() string {
vars := make([]string, 0, len(err.MissingVars))
for _, v := range err.MissingVars {
vars = append(vars, v.String())
}
return fmt.Sprintf(
`task: Task %q cancelled because it is missing required variables: %s`,
err.TaskName,
strings.Join(vars, ", "))
}
func (err *TaskMissingRequiredVarsError) Code() int {
return CodeTaskMissingRequiredVars
}
type NotAllowedVar struct {
Value string
Enum []string
Name string
}
type TaskNotAllowedVarsError struct {
TaskName string
NotAllowedVars []NotAllowedVar
}
func (err *TaskNotAllowedVarsError) Error() string {
var builder strings.Builder
builder.WriteString(fmt.Sprintf("task: Task %q cancelled because it is missing required variables:\n", err.TaskName)) //nolint:staticcheck
for _, s := range err.NotAllowedVars {
builder.WriteString(fmt.Sprintf(" - %s has an invalid value : '%s' (allowed values : %v)\n", s.Name, s.Value, s.Enum)) //nolint:staticcheck
}
return builder.String()
}
func (err *TaskNotAllowedVarsError) Code() int {
return CodeTaskNotAllowedVars
}

218
errors/errors_taskfile.go Normal file
View File

@@ -0,0 +1,218 @@
package errors
import (
"fmt"
"net/http"
"path/filepath"
"time"
"github.com/Masterminds/semver/v3"
)
// TaskfileNotFoundError is returned when no appropriate Taskfile is found when
// searching the filesystem.
type TaskfileNotFoundError struct {
URI string
Walk bool
AskInit bool
OwnerChange bool
}
func (err TaskfileNotFoundError) Error() string {
var walkText string
if err.OwnerChange {
walkText = " (or any of the parent directories until ownership changed)."
} else if err.Walk {
walkText = " (or any of the parent directories)."
}
if err.AskInit {
walkText += " Run `task --init` to create a new Taskfile."
}
return fmt.Sprintf(`task: No Taskfile found at %q%s`, filepath.ToSlash(err.URI), walkText)
}
func (err TaskfileNotFoundError) Code() int {
return CodeTaskfileNotFound
}
// TaskfileAlreadyExistsError is returned on creating a Taskfile if one already
// exists.
type TaskfileAlreadyExistsError struct{}
func (err TaskfileAlreadyExistsError) Error() string {
return "task: A Taskfile already exists"
}
func (err TaskfileAlreadyExistsError) Code() int {
return CodeTaskfileAlreadyExists
}
// TaskfileInvalidError is returned when the Taskfile contains syntax errors or
// cannot be parsed for some reason.
type TaskfileInvalidError struct {
URI string
Err error
}
func (err TaskfileInvalidError) Error() string {
return fmt.Sprintf("task: Failed to parse %s:\n%v", filepath.ToSlash(err.URI), err.Err)
}
func (err TaskfileInvalidError) Code() int {
return CodeTaskfileInvalid
}
// TaskfileFetchFailedError is returned when no appropriate Taskfile is found when
// searching the filesystem.
type TaskfileFetchFailedError struct {
URI string
HTTPStatusCode int
}
func (err TaskfileFetchFailedError) Error() string {
var statusText string
if err.HTTPStatusCode != 0 {
statusText = fmt.Sprintf(" with status code %d (%s)", err.HTTPStatusCode, http.StatusText(err.HTTPStatusCode))
}
return fmt.Sprintf(`task: Download of %q failed%s`, filepath.ToSlash(err.URI), statusText)
}
func (err TaskfileFetchFailedError) Code() int {
return CodeTaskfileFetchFailed
}
// TaskfileNotTrustedError is returned when the user does not accept the trust
// prompt when downloading a remote Taskfile.
type TaskfileNotTrustedError struct {
URI string
}
func (err *TaskfileNotTrustedError) Error() string {
return fmt.Sprintf(
`task: Taskfile %q not trusted by user`,
filepath.ToSlash(err.URI),
)
}
func (err *TaskfileNotTrustedError) Code() int {
return CodeTaskfileNotTrusted
}
// TaskfileNotSecureError is returned when the user attempts to download a
// remote Taskfile over an insecure connection.
type TaskfileNotSecureError struct {
URI string
}
func (err *TaskfileNotSecureError) Error() string {
return fmt.Sprintf(
`task: Taskfile %q cannot be downloaded over an insecure connection. You can override this by using the --insecure flag`,
filepath.ToSlash(err.URI),
)
}
func (err *TaskfileNotSecureError) Code() int {
return CodeTaskfileNotSecure
}
// TaskfileCacheNotFoundError is returned when the user attempts to use an offline
// (cached) Taskfile but the files does not exist in the cache.
type TaskfileCacheNotFoundError struct {
URI string
}
func (err *TaskfileCacheNotFoundError) Error() string {
return fmt.Sprintf(
`task: Taskfile %q was not found in the cache. Remove the --offline flag to use a remote copy or download it using the --download flag`,
filepath.ToSlash(err.URI),
)
}
func (err *TaskfileCacheNotFoundError) Code() int {
return CodeTaskfileCacheNotFound
}
// TaskfileVersionCheckError is returned when the user attempts to run a
// Taskfile that does not contain a Taskfile schema version key or if they try
// to use a feature that is not supported by the schema version.
type TaskfileVersionCheckError struct {
URI string
SchemaVersion *semver.Version
Message string
}
func (err *TaskfileVersionCheckError) Error() string {
if err.SchemaVersion == nil {
return fmt.Sprintf(
`task: Missing schema version in Taskfile %q`,
filepath.ToSlash(err.URI),
)
}
return fmt.Sprintf(
"task: Invalid schema version in Taskfile %q:\nSchema version (%s) %s",
filepath.ToSlash(err.URI),
err.SchemaVersion.String(),
err.Message,
)
}
func (err *TaskfileVersionCheckError) Code() int {
return CodeTaskfileVersionCheckError
}
// TaskfileNetworkTimeoutError is returned when the user attempts to use a remote
// Taskfile but a network connection could not be established within the timeout.
type TaskfileNetworkTimeoutError struct {
URI string
Timeout time.Duration
}
func (err *TaskfileNetworkTimeoutError) Error() string {
return fmt.Sprintf(
`task: Network connection timed out after %s while attempting to download Taskfile %q`,
err.Timeout, filepath.ToSlash(err.URI),
)
}
func (err *TaskfileNetworkTimeoutError) Code() int {
return CodeTaskfileNetworkTimeout
}
// TaskfileCycleError is returned when we detect that a Taskfile includes a
// set of Taskfiles that include each other in a cycle.
type TaskfileCycleError struct {
Source string
Destination string
}
func (err TaskfileCycleError) Error() string {
return fmt.Sprintf("task: include cycle detected between %s <--> %s",
filepath.ToSlash(err.Source),
filepath.ToSlash(err.Destination),
)
}
func (err TaskfileCycleError) Code() int {
return CodeTaskfileCycle
}
// TaskfileDoesNotMatchChecksum is returned when a Taskfile's checksum does not
// match the one pinned in the parent Taskfile.
type TaskfileDoesNotMatchChecksum struct {
URI string
ExpectedChecksum string
ActualChecksum string
}
func (err *TaskfileDoesNotMatchChecksum) Error() string {
return fmt.Sprintf(
"task: The checksum of the Taskfile at %q does not match!\ngot: %q\nwant: %q",
filepath.ToSlash(err.URI),
err.ActualChecksum,
err.ExpectedChecksum,
)
}
func (err *TaskfileDoesNotMatchChecksum) Code() int {
return CodeTaskfileDoesNotMatchChecksum
}

20
errors/errors_taskrc.go Normal file
View File

@@ -0,0 +1,20 @@
package errors
import "fmt"
type TaskRCNotFoundError struct {
URI string
Walk bool
}
func (err TaskRCNotFoundError) Error() string {
var walkText string
if err.Walk {
walkText = " (or any of the parent directories)"
}
return fmt.Sprintf(`task: No Task config file found at %q%s`, err.URI, walkText)
}
func (err TaskRCNotFoundError) Code() int {
return CodeTaskRCNotFoundError
}

619
executor.go Normal file
View File

@@ -0,0 +1,619 @@
package task
import (
"context"
"io"
"os"
"sync"
"time"
"github.com/puzpuzpuz/xsync/v4"
"github.com/sajari/fuzzy"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/output"
"github.com/go-task/task/v3/internal/sort"
"github.com/go-task/task/v3/taskfile/ast"
)
type (
// An ExecutorOption is any type that can apply a configuration to an
// [Executor].
ExecutorOption interface {
ApplyToExecutor(*Executor)
}
// An Executor is used for processing Taskfile(s) and executing the task(s)
// within them.
Executor struct {
// Flags
Dir string
Entrypoint string
TempDir TempDir
Force bool
ForceAll bool
Insecure bool
Download bool
Offline bool
TrustedHosts []string
Timeout time.Duration
CacheExpiryDuration time.Duration
RemoteCacheDir string
CACert string
Cert string
CertKey string
Watch bool
Verbose bool
Silent bool
DisableFuzzy bool
AssumeYes bool
AssumeTerm bool // Used for testing
Interactive bool
Dry bool
Summary bool
Parallel bool
Color bool
Concurrency int
Interval time.Duration
Failfast bool
// I/O
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// Internal
Taskfile *ast.Taskfile
Logger *logger.Logger
Compiler *Compiler
Output output.Output
OutputStyle ast.Output
TaskSorter sort.Sorter
UserWorkingDir string
EnableVersionCheck bool
fuzzyModel *fuzzy.Model
fuzzyModelOnce sync.Once
promptedVars *ast.Vars // vars collected via interactive prompts
concurrencySemaphore chan struct{}
taskCallCount map[string]*int32
mkdirMutexMap map[string]*sync.Mutex
executionHashes map[string]context.Context
executionHashesMutex sync.Mutex
watchedDirs *xsync.Map[string, bool]
}
TempDir struct {
Remote string
Fingerprint string
}
)
// NewExecutor creates a new [Executor] and applies the given functional options
// to it.
func NewExecutor(opts ...ExecutorOption) *Executor {
e := &Executor{
Timeout: time.Second * 10,
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
Logger: nil,
Compiler: nil,
Output: nil,
OutputStyle: ast.Output{},
TaskSorter: sort.AlphaNumericWithRootTasksFirst,
UserWorkingDir: "",
fuzzyModel: nil,
concurrencySemaphore: nil,
taskCallCount: map[string]*int32{},
mkdirMutexMap: map[string]*sync.Mutex{},
executionHashes: map[string]context.Context{},
executionHashesMutex: sync.Mutex{},
}
e.Options(opts...)
return e
}
// Options loops through the given [ExecutorOption] functions and applies them
// to the [Executor].
func (e *Executor) Options(opts ...ExecutorOption) {
for _, opt := range opts {
opt.ApplyToExecutor(e)
}
}
// WithDir sets the working directory of the [Executor]. By default, the
// directory is set to the user's current working directory.
func WithDir(dir string) ExecutorOption {
return &dirOption{dir}
}
type dirOption struct {
dir string
}
func (o *dirOption) ApplyToExecutor(e *Executor) {
e.Dir = o.dir
}
// WithEntrypoint sets the entrypoint (main Taskfile) of the [Executor]. By
// default, Task will search for one of the default Taskfiles in the given
// directory.
func WithEntrypoint(entrypoint string) ExecutorOption {
return &entrypointOption{entrypoint}
}
type entrypointOption struct {
entrypoint string
}
func (o *entrypointOption) ApplyToExecutor(e *Executor) {
e.Entrypoint = o.entrypoint
}
// WithTempDir sets the temporary directory that will be used by [Executor] for
// storing temporary files like checksums and cached remote files. By default,
// the temporary directory is set to the user's temporary directory.
func WithTempDir(tempDir TempDir) ExecutorOption {
return &tempDirOption{tempDir}
}
type tempDirOption struct {
tempDir TempDir
}
func (o *tempDirOption) ApplyToExecutor(e *Executor) {
e.TempDir = o.tempDir
}
// WithForce ensures that the [Executor] always runs a task, even when
// fingerprinting or prompts would normally stop it.
func WithForce(force bool) ExecutorOption {
return &forceOption{force}
}
type forceOption struct {
force bool
}
func (o *forceOption) ApplyToExecutor(e *Executor) {
e.Force = o.force
}
// WithForceAll ensures that the [Executor] always runs all tasks (including
// subtasks), even when fingerprinting or prompts would normally stop them.
func WithForceAll(forceAll bool) ExecutorOption {
return &forceAllOption{forceAll}
}
type forceAllOption struct {
forceAll bool
}
func (o *forceAllOption) ApplyToExecutor(e *Executor) {
e.ForceAll = o.forceAll
}
// WithInsecure allows the [Executor] to make insecure connections when reading
// remote taskfiles. By default, insecure connections are rejected.
func WithInsecure(insecure bool) ExecutorOption {
return &insecureOption{insecure}
}
type insecureOption struct {
insecure bool
}
func (o *insecureOption) ApplyToExecutor(e *Executor) {
e.Insecure = o.insecure
}
// WithDownload forces the [Executor] to download a fresh copy of the taskfile
// from the remote source.
func WithDownload(download bool) ExecutorOption {
return &downloadOption{download}
}
type downloadOption struct {
download bool
}
func (o *downloadOption) ApplyToExecutor(e *Executor) {
e.Download = o.download
}
// WithOffline stops the [Executor] from being able to make network connections.
// It will still be able to read local files and cached copies of remote files.
func WithOffline(offline bool) ExecutorOption {
return &offlineOption{offline}
}
type offlineOption struct {
offline bool
}
func (o *offlineOption) ApplyToExecutor(e *Executor) {
e.Offline = o.offline
}
// WithTrustedHosts configures the [Executor] with a list of trusted hosts for remote
// Taskfiles. Hosts in this list will not prompt for user confirmation.
func WithTrustedHosts(trustedHosts []string) ExecutorOption {
return &trustedHostsOption{trustedHosts}
}
type trustedHostsOption struct {
trustedHosts []string
}
func (o *trustedHostsOption) ApplyToExecutor(e *Executor) {
e.TrustedHosts = o.trustedHosts
}
// WithTimeout sets the [Executor]'s timeout for fetching remote taskfiles. By
// default, the timeout is set to 10 seconds.
func WithTimeout(timeout time.Duration) ExecutorOption {
return &timeoutOption{timeout}
}
type timeoutOption struct {
timeout time.Duration
}
func (o *timeoutOption) ApplyToExecutor(e *Executor) {
e.Timeout = o.timeout
}
// WithCacheExpiryDuration sets the duration after which the cache is considered
// expired. By default, the cache is 0 (disabled).
func WithCacheExpiryDuration(duration time.Duration) ExecutorOption {
return &cacheExpiryDurationOption{duration: duration}
}
type cacheExpiryDurationOption struct {
duration time.Duration
}
func (o *cacheExpiryDurationOption) ApplyToExecutor(r *Executor) {
r.CacheExpiryDuration = o.duration
}
// WithRemoteCacheDir sets the directory where remote taskfiles are cached.
func WithRemoteCacheDir(dir string) ExecutorOption {
return &remoteCacheDirOption{dir: dir}
}
type remoteCacheDirOption struct {
dir string
}
func (o *remoteCacheDirOption) ApplyToExecutor(e *Executor) {
e.RemoteCacheDir = o.dir
}
// WithCACert sets the path to a custom CA certificate for TLS connections.
func WithCACert(caCert string) ExecutorOption {
return &caCertOption{caCert: caCert}
}
type caCertOption struct {
caCert string
}
func (o *caCertOption) ApplyToExecutor(e *Executor) {
e.CACert = o.caCert
}
// WithCert sets the path to a client certificate for TLS connections.
func WithCert(cert string) ExecutorOption {
return &certOption{cert: cert}
}
type certOption struct {
cert string
}
func (o *certOption) ApplyToExecutor(e *Executor) {
e.Cert = o.cert
}
// WithCertKey sets the path to a client certificate key for TLS connections.
func WithCertKey(certKey string) ExecutorOption {
return &certKeyOption{certKey: certKey}
}
type certKeyOption struct {
certKey string
}
func (o *certKeyOption) ApplyToExecutor(e *Executor) {
e.CertKey = o.certKey
}
// WithWatch tells the [Executor] to keep running in the background and watch
// for changes to the fingerprint of the tasks that are run. When changes are
// detected, a new task run is triggered.
func WithWatch(watch bool) ExecutorOption {
return &watchOption{watch}
}
type watchOption struct {
watch bool
}
func (o *watchOption) ApplyToExecutor(e *Executor) {
e.Watch = o.watch
}
// WithVerbose tells the [Executor] to output more information about the tasks
// that are run.
func WithVerbose(verbose bool) ExecutorOption {
return &verboseOption{verbose}
}
type verboseOption struct {
verbose bool
}
func (o *verboseOption) ApplyToExecutor(e *Executor) {
e.Verbose = o.verbose
}
// WithSilent tells the [Executor] to suppress all output except for the output
// of the tasks that are run.
func WithSilent(silent bool) ExecutorOption {
return &silentOption{silent}
}
type silentOption struct {
silent bool
}
func (o *silentOption) ApplyToExecutor(e *Executor) {
e.Silent = o.silent
}
// WithDisableFuzzy tells the [Executor] to disable fuzzy matching for task names.
func WithDisableFuzzy(disableFuzzy bool) ExecutorOption {
return &disableFuzzyOption{disableFuzzy}
}
type disableFuzzyOption struct {
disableFuzzy bool
}
func (o *disableFuzzyOption) ApplyToExecutor(e *Executor) {
e.DisableFuzzy = o.disableFuzzy
}
// WithAssumeYes tells the [Executor] to assume "yes" for all prompts.
func WithAssumeYes(assumeYes bool) ExecutorOption {
return &assumeYesOption{assumeYes}
}
type assumeYesOption struct {
assumeYes bool
}
func (o *assumeYesOption) ApplyToExecutor(e *Executor) {
e.AssumeYes = o.assumeYes
}
// WithAssumeTerm is used for testing purposes to simulate a terminal.
func WithAssumeTerm(assumeTerm bool) ExecutorOption {
return &assumeTermOption{assumeTerm}
}
type assumeTermOption struct {
assumeTerm bool
}
func (o *assumeTermOption) ApplyToExecutor(e *Executor) {
e.AssumeTerm = o.assumeTerm
}
// WithInteractive tells the [Executor] to prompt for missing required variables.
func WithInteractive(interactive bool) ExecutorOption {
return &interactiveOption{interactive}
}
type interactiveOption struct {
interactive bool
}
func (o *interactiveOption) ApplyToExecutor(e *Executor) {
e.Interactive = o.interactive
}
// WithDry tells the [Executor] to output the commands that would be run without
// actually running them.
func WithDry(dry bool) ExecutorOption {
return &dryOption{dry}
}
type dryOption struct {
dry bool
}
func (o *dryOption) ApplyToExecutor(e *Executor) {
e.Dry = o.dry
}
// WithSummary tells the [Executor] to output a summary of the given tasks
// instead of running them.
func WithSummary(summary bool) ExecutorOption {
return &summaryOption{summary}
}
type summaryOption struct {
summary bool
}
func (o *summaryOption) ApplyToExecutor(e *Executor) {
e.Summary = o.summary
}
// WithParallel tells the [Executor] to run tasks given in the same call in
// parallel.
func WithParallel(parallel bool) ExecutorOption {
return &parallelOption{parallel}
}
type parallelOption struct {
parallel bool
}
func (o *parallelOption) ApplyToExecutor(e *Executor) {
e.Parallel = o.parallel
}
// WithColor tells the [Executor] whether or not to output using colorized
// strings.
func WithColor(color bool) ExecutorOption {
return &colorOption{color}
}
type colorOption struct {
color bool
}
func (o *colorOption) ApplyToExecutor(e *Executor) {
e.Color = o.color
}
// WithConcurrency sets the maximum number of tasks that the [Executor] can run
// in parallel.
func WithConcurrency(concurrency int) ExecutorOption {
return &concurrencyOption{concurrency}
}
type concurrencyOption struct {
concurrency int
}
func (o *concurrencyOption) ApplyToExecutor(e *Executor) {
e.Concurrency = o.concurrency
}
// WithInterval sets the interval at which the [Executor] will wait for
// duplicated events before running a task.
func WithInterval(interval time.Duration) ExecutorOption {
return &intervalOption{interval}
}
type intervalOption struct {
interval time.Duration
}
func (o *intervalOption) ApplyToExecutor(e *Executor) {
e.Interval = o.interval
}
// WithOutputStyle sets the output style of the [Executor]. By default, the
// output style is set to the style defined in the Taskfile.
func WithOutputStyle(outputStyle ast.Output) ExecutorOption {
return &outputStyleOption{outputStyle}
}
type outputStyleOption struct {
outputStyle ast.Output
}
func (o *outputStyleOption) ApplyToExecutor(e *Executor) {
e.OutputStyle = o.outputStyle
}
// WithTaskSorter sets the sorter that the [Executor] will use to sort tasks. By
// default, the sorter is set to sort tasks alphabetically, but with tasks with
// no namespace (in the root Taskfile) first.
func WithTaskSorter(sorter sort.Sorter) ExecutorOption {
return &taskSorterOption{sorter}
}
type taskSorterOption struct {
sorter sort.Sorter
}
func (o *taskSorterOption) ApplyToExecutor(e *Executor) {
e.TaskSorter = o.sorter
}
// WithStdin sets the [Executor]'s standard input [io.Reader].
func WithStdin(stdin io.Reader) ExecutorOption {
return &stdinOption{stdin}
}
type stdinOption struct {
stdin io.Reader
}
func (o *stdinOption) ApplyToExecutor(e *Executor) {
e.Stdin = o.stdin
}
// WithStdout sets the [Executor]'s standard output [io.Writer].
func WithStdout(stdout io.Writer) ExecutorOption {
return &stdoutOption{stdout}
}
type stdoutOption struct {
stdout io.Writer
}
func (o *stdoutOption) ApplyToExecutor(e *Executor) {
e.Stdout = o.stdout
}
// WithStderr sets the [Executor]'s standard error [io.Writer].
func WithStderr(stderr io.Writer) ExecutorOption {
return &stderrOption{stderr}
}
type stderrOption struct {
stderr io.Writer
}
func (o *stderrOption) ApplyToExecutor(e *Executor) {
e.Stderr = o.stderr
}
// WithIO sets the [Executor]'s standard input, output, and error to the same
// [io.ReadWriter].
func WithIO(rw io.ReadWriter) ExecutorOption {
return &ioOption{rw}
}
type ioOption struct {
rw io.ReadWriter
}
func (o *ioOption) ApplyToExecutor(e *Executor) {
e.Stdin = o.rw
e.Stdout = o.rw
e.Stderr = o.rw
}
// WithVersionCheck tells the [Executor] whether or not to check the version of
func WithVersionCheck(enableVersionCheck bool) ExecutorOption {
return &versionCheckOption{enableVersionCheck}
}
type versionCheckOption struct {
enableVersionCheck bool
}
func (o *versionCheckOption) ApplyToExecutor(e *Executor) {
e.EnableVersionCheck = o.enableVersionCheck
}
// WithFailfast tells the [Executor] whether or not to check the version of
func WithFailfast(failfast bool) ExecutorOption {
return &failfastOption{failfast}
}
type failfastOption struct {
failfast bool
}
func (o *failfastOption) ApplyToExecutor(e *Executor) {
e.Failfast = o.failfast
}

1222
executor_test.go Normal file

File diff suppressed because it is too large Load Diff

35
experiments/errors.go Normal file
View File

@@ -0,0 +1,35 @@
package experiments
import (
"fmt"
"strconv"
"strings"
"github.com/go-task/task/v3/internal/slicesext"
)
type InvalidValueError struct {
Name string
AllowedValues []int
Value int
}
func (err InvalidValueError) Error() string {
return fmt.Sprintf(
"task: Experiment %q has an invalid value %q (allowed values: %s)",
err.Name,
err.Value,
strings.Join(slicesext.Convert(err.AllowedValues, strconv.Itoa), ", "),
)
}
type InactiveError struct {
Name string
}
func (err InactiveError) Error() string {
return fmt.Sprintf(
"task: Experiment %q is inactive and cannot be enabled",
err.Name,
)
}

67
experiments/experiment.go Normal file
View File

@@ -0,0 +1,67 @@
package experiments
import (
"fmt"
"slices"
"strconv"
"github.com/go-task/task/v3/taskrc/ast"
)
type Experiment struct {
Name string // The name of the experiment.
AllowedValues []int // The values that can enable this experiment.
Value int // The version of the experiment that is enabled.
}
// New creates a new experiment with the given name and sets the values that can
// enable it.
func New(xName string, config *ast.TaskRC, allowedValues ...int) Experiment {
var value int
if config != nil {
value = config.Experiments[xName]
}
if value == 0 {
value, _ = strconv.Atoi(getEnv(xName))
}
x := Experiment{
Name: xName,
AllowedValues: allowedValues,
Value: value,
}
xList = append(xList, x)
return x
}
func (x Experiment) Enabled() bool {
return slices.Contains(x.AllowedValues, x.Value)
}
func (x Experiment) Active() bool {
return len(x.AllowedValues) > 0
}
func (x Experiment) Valid() error {
if !x.Active() && x.Value != 0 {
return &InactiveError{
Name: x.Name,
}
}
if !x.Enabled() && x.Value != 0 {
return &InvalidValueError{
Name: x.Name,
AllowedValues: x.AllowedValues,
Value: x.Value,
}
}
return nil
}
func (x Experiment) String() string {
if x.Enabled() {
return fmt.Sprintf("on (%d)", x.Value)
}
return "off"
}

View File

@@ -0,0 +1,140 @@
package experiments_test
import (
"strconv"
"testing"
"github.com/stretchr/testify/assert"
"github.com/go-task/task/v3/experiments"
"github.com/go-task/task/v3/taskrc/ast"
)
func TestNew(t *testing.T) {
const (
exampleExperiment = "EXAMPLE"
exampleExperimentEnv = "TASK_X_EXAMPLE"
)
tests := []struct {
name string
config *ast.TaskRC
allowedValues []int
env int
wantEnabled bool
wantActive bool
wantValid error
wantValue int
}{
{
name: `[] allowed, env=""`,
wantEnabled: false,
wantActive: false,
},
{
name: `[] allowed, env="1"`,
env: 1,
wantEnabled: false,
wantActive: false,
wantValid: &experiments.InactiveError{
Name: exampleExperiment,
},
wantValue: 1,
},
{
name: `[1] allowed, env=""`,
allowedValues: []int{1},
wantEnabled: false,
wantActive: true,
},
{
name: `[1] allowed, env="1"`,
allowedValues: []int{1},
env: 1,
wantEnabled: true,
wantActive: true,
wantValue: 1,
},
{
name: `[1] allowed, env="2"`,
allowedValues: []int{1},
env: 2,
wantEnabled: false,
wantActive: true,
wantValid: &experiments.InvalidValueError{
Name: exampleExperiment,
AllowedValues: []int{1},
Value: 2,
},
wantValue: 2,
},
{
name: `[1, 2] allowed, env="1"`,
allowedValues: []int{1, 2},
env: 1,
wantEnabled: true,
wantActive: true,
wantValue: 1,
},
{
name: `[1, 2] allowed, env="1"`,
allowedValues: []int{1, 2},
env: 2,
wantEnabled: true,
wantActive: true,
wantValue: 2,
},
{
name: `[1] allowed, config="1"`,
config: &ast.TaskRC{
Experiments: map[string]int{
exampleExperiment: 1,
},
},
allowedValues: []int{1},
wantEnabled: true,
wantActive: true,
wantValue: 1,
},
{
name: `[1] allowed, config="2"`,
config: &ast.TaskRC{
Experiments: map[string]int{
exampleExperiment: 2,
},
},
allowedValues: []int{1},
wantEnabled: false,
wantActive: true,
wantValid: &experiments.InvalidValueError{
Name: exampleExperiment,
AllowedValues: []int{1},
Value: 2,
},
wantValue: 2,
},
{
name: `[1, 2] allowed, env="1", config="2"`,
config: &ast.TaskRC{
Experiments: map[string]int{
exampleExperiment: 2,
},
},
allowedValues: []int{1, 2},
env: 1,
wantEnabled: true,
wantActive: true,
wantValue: 2,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Setenv(exampleExperimentEnv, strconv.Itoa(tt.env))
x := experiments.New(exampleExperiment, tt.config, tt.allowedValues...)
assert.Equal(t, exampleExperiment, x.Name)
assert.Equal(t, tt.wantEnabled, x.Enabled())
assert.Equal(t, tt.wantActive, x.Active())
assert.Equal(t, tt.wantValid, x.Valid())
assert.Equal(t, tt.wantValue, x.Value)
})
}
}

View File

@@ -0,0 +1,89 @@
package experiments
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/joho/godotenv"
"github.com/go-task/task/v3/taskrc"
"github.com/go-task/task/v3/taskrc/ast"
)
const envPrefix = "TASK_X_"
// Active experiments.
var (
GentleForce Experiment
RemoteTaskfiles Experiment
EnvPrecedence Experiment
)
// Inactive experiments. These are experiments that cannot be enabled, but are
// preserved for error handling.
var (
AnyVariables Experiment
MapVariables Experiment
)
// An internal list of all the initialized experiments used for iterating.
var xList []Experiment
func Parse(dir string) {
config, _ := taskrc.GetConfig(dir)
ParseWithConfig(dir, config)
}
func ParseWithConfig(dir string, config *ast.TaskRC) {
// Read any .env files
readDotEnv(dir)
// Initialize the experiments
GentleForce = New("GENTLE_FORCE", config, 1)
RemoteTaskfiles = New("REMOTE_TASKFILES", config, 1)
EnvPrecedence = New("ENV_PRECEDENCE", config, 1)
AnyVariables = New("ANY_VARIABLES", config)
MapVariables = New("MAP_VARIABLES", config)
}
// Validate checks if any experiments have been enabled while being inactive.
// If one is found, the function returns an error.
func Validate() error {
for _, x := range List() {
if err := x.Valid(); err != nil {
return err
}
}
return nil
}
func List() []Experiment {
return xList
}
func getEnv(xName string) string {
envName := fmt.Sprintf("%s%s", envPrefix, xName)
return os.Getenv(envName)
}
func getFilePath(filename, dir string) string {
if dir != "" {
return filepath.Join(dir, filename)
}
return filename
}
func readDotEnv(dir string) {
env, err := godotenv.Read(getFilePath(".env", dir))
if err != nil {
return
}
// If the env var is an experiment, set it.
for key, value := range env {
if strings.HasPrefix(key, envPrefix) {
os.Setenv(key, value)
}
}
}

236
formatter_test.go Normal file
View File

@@ -0,0 +1,236 @@
package task_test
import (
"bytes"
"path/filepath"
"testing"
"github.com/sebdah/goldie/v2"
"github.com/stretchr/testify/require"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/experiments"
"github.com/go-task/task/v3/taskfile/ast"
)
type (
// A FormatterTestOption is a function that configures an [FormatterTest].
FormatterTestOption interface {
applyToFormatterTest(*FormatterTest)
}
// A FormatterTest is a test wrapper around a [task.Executor] to make it
// easy to write tests for the task formatter. See [NewFormatterTest] for
// information on creating and running FormatterTests. These tests use
// fixture files to assert whether the result of the output is correct. If
// Task's behavior has been changed, the fixture files can be updated by
// running `task gen:fixtures`.
FormatterTest struct {
TaskTest
task string
vars map[string]any
executorOpts []task.ExecutorOption
listOptions task.ListOptions
wantSetupError bool
wantListError bool
}
)
// NewFormatterTest sets up a new [task.Executor] with the given options and
// runs a task with the given [FormatterTestOption]s. The output of the task is
// written to a set of fixture files depending on the configuration of the test.
func NewFormatterTest(t *testing.T, opts ...FormatterTestOption) {
t.Helper()
tt := &FormatterTest{
task: "default",
vars: map[string]any{},
TaskTest: TaskTest{
experiments: map[*experiments.Experiment]int{},
fixtureTemplateData: map[string]any{},
},
}
// Apply the functional options
for _, opt := range opts {
opt.applyToFormatterTest(tt)
}
// Enable any experiments that have been set
for x, v := range tt.experiments {
prev := *x
*x = experiments.Experiment{
Name: prev.Name,
AllowedValues: []int{v},
Value: v,
}
t.Cleanup(func() {
*x = prev
})
}
tt.run(t)
}
// Functional options
// WithListOptions sets the list options for the formatter.
func WithListOptions(opts task.ListOptions) FormatterTestOption {
return &listOptionsTestOption{opts}
}
type listOptionsTestOption struct {
listOptions task.ListOptions
}
func (opt *listOptionsTestOption) applyToFormatterTest(t *FormatterTest) {
t.listOptions = opt.listOptions
}
// WithListError tells the test to expect an error when running the formatter.
// A fixture will be created with the output of any errors.
func WithListError() FormatterTestOption {
return &listErrorTestOption{}
}
type listErrorTestOption struct{}
func (opt *listErrorTestOption) applyToFormatterTest(t *FormatterTest) {
t.wantListError = true
}
// Helpers
// writeFixtureErrList is a wrapper for writing the output of an error when
// running the formatter to a fixture file.
func (tt *FormatterTest) writeFixtureErrList(
t *testing.T,
g *goldie.Goldie,
err error,
) {
t.Helper()
tt.writeFixture(t, g, "err-list", []byte(err.Error()))
}
// run is the main function for running the test. It sets up the task executor,
// runs the task, and writes the output to a fixture file.
func (tt *FormatterTest) run(t *testing.T) {
t.Helper()
f := func(t *testing.T) {
t.Helper()
var buf bytes.Buffer
opts := append(
tt.executorOpts,
task.WithStdout(&buf),
task.WithStderr(&buf),
)
// Set up the task executor
e := task.NewExecutor(opts...)
// Create a golden fixture file for the output
g := goldie.New(t,
goldie.WithFixtureDir(filepath.Join(e.Dir, "testdata")),
goldie.WithEqualFn(NormalizedEqual),
)
// Call setup and check for errors
if err := e.Setup(); tt.wantSetupError {
require.Error(t, err)
tt.writeFixtureErrSetup(t, g, err)
tt.writeFixtureBuffer(t, g, buf)
return
} else {
require.NoError(t, err)
}
// Create the task call
vars := ast.NewVars()
for key, value := range tt.vars {
vars.Set(key, ast.Var{Value: value})
}
// Run the formatter and check for errors
if _, err := e.ListTasks(tt.listOptions); tt.wantListError {
require.Error(t, err)
tt.writeFixtureErrList(t, g, err)
tt.writeFixtureBuffer(t, g, buf)
return
} else {
require.NoError(t, err)
}
tt.writeFixtureBuffer(t, g, buf)
}
// Run the test (with a name if it has one)
if tt.name != "" {
t.Run(tt.name, f)
} else {
f(t)
}
}
func TestNoLabelInList(t *testing.T) {
t.Parallel()
NewFormatterTest(t,
WithExecutorOptions(
task.WithDir("testdata/label_list"),
),
WithListOptions(task.ListOptions{
ListOnlyTasksWithDescriptions: true,
}),
)
}
// task -al case 1: listAll list all tasks
func TestListAllShowsNoDesc(t *testing.T) {
t.Parallel()
NewFormatterTest(t,
WithExecutorOptions(
task.WithDir("testdata/list_mixed_desc"),
),
WithListOptions(task.ListOptions{
ListAllTasks: true,
}),
)
}
// task -al case 2: !listAll list some tasks (only those with desc)
func TestListCanListDescOnly(t *testing.T) {
t.Parallel()
NewFormatterTest(t,
WithExecutorOptions(
task.WithDir("testdata/list_mixed_desc"),
),
WithListOptions(task.ListOptions{
ListOnlyTasksWithDescriptions: true,
}),
)
}
func TestListDescInterpolation(t *testing.T) {
t.Parallel()
NewFormatterTest(t,
WithExecutorOptions(
task.WithDir("testdata/list_desc_interpolation"),
),
WithListOptions(task.ListOptions{
ListOnlyTasksWithDescriptions: true,
}),
)
}
func TestJsonListFormat(t *testing.T) {
t.Parallel()
NewFormatterTest(t,
WithExecutorOptions(
task.WithDir("testdata/json_list_format"),
),
WithListOptions(task.ListOptions{
FormatTaskListAsJSON: true,
}),
WithFixtureTemplating(),
)
}

143
go.mod
View File

@@ -1,17 +1,136 @@
module github.com/go-task/task/v3
go 1.25.10
require (
github.com/fatih/color v1.7.0
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
github.com/joho/godotenv v1.3.0
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-zglob v0.0.1
github.com/radovskyb/watcher v1.0.5
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.5.1
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
mvdan.cc/sh/v3 v3.2.1
charm.land/bubbles/v2 v2.1.0
charm.land/bubbletea/v2 v2.0.6
charm.land/lipgloss/v2 v2.0.3
github.com/Ladicle/tabwriter v1.0.0
github.com/Masterminds/semver/v3 v3.5.0
github.com/alecthomas/chroma/v2 v2.24.1
github.com/chainguard-dev/git-urls v1.0.2
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/dominikbraun/graph v0.23.0
github.com/elliotchance/orderedmap/v3 v3.1.0
github.com/fatih/color v1.19.0
github.com/fsnotify/fsnotify v1.10.1
github.com/go-task/slim-sprig/v3 v3.0.0
github.com/go-task/template v0.2.0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-getter v1.8.6
github.com/joho/godotenv v1.5.1
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/puzpuzpuz/xsync/v4 v4.5.0
github.com/sajari/fuzzy v1.0.0
github.com/sebdah/goldie/v2 v2.8.0
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
github.com/zeebo/xxh3 v1.1.0
go.yaml.in/yaml/v3 v3.0.4
golang.org/x/sync v0.20.0
golang.org/x/term v0.43.0
mvdan.cc/sh/moreinterp v0.0.0-20260120230322-19def062a997
mvdan.cc/sh/v3 v3.13.2-0.20260510185049-f5c6e2779117
)
go 1.13
require (
cel.dev/expr v0.25.1 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.18.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
cloud.google.com/go/iam v1.5.3 // indirect
cloud.google.com/go/monitoring v1.24.3 // indirect
cloud.google.com/go/storage v1.61.3 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.55.0 // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aws/aws-sdk-go-v2 v1.41.5 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect
github.com/aws/aws-sdk-go-v2/config v1.32.12 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.12 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.20 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.13 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.17 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.9 // indirect
github.com/aws/smithy-go v1.24.2 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/charmbracelet/colorprofile v0.4.3 // indirect
github.com/charmbracelet/ultraviolet v0.0.0-20260416155717-489999b90468 // indirect
github.com/charmbracelet/x/ansi v0.11.7 // indirect
github.com/charmbracelet/x/term v0.2.2 // indirect
github.com/charmbracelet/x/termios v0.1.1 // indirect
github.com/charmbracelet/x/windows v0.2.2 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect
github.com/dlclark/regexp2 v1.12.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.36.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.3.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.14 // indirect
github.com/googleapis/gax-go/v2 v2.17.0 // indirect
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.72 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-version v1.8.0 // indirect
github.com/klauspost/compress v1.18.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.23 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/u-root/u-root v0.15.1-0.20251208185023-2f8c7e763cf8 // indirect
github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sys v0.44.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/time v0.15.0 // indirect
google.golang.org/api v0.271.0 // indirect
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect
google.golang.org/grpc v1.79.3 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

369
go.sum
View File

@@ -1,62 +1,329 @@
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=
cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
charm.land/bubbles/v2 v2.1.0 h1:YSnNh5cPYlYjPxRrzs5VEn3vwhtEn3jVGRBT3M7/I0g=
charm.land/bubbles/v2 v2.1.0/go.mod h1:l97h4hym2hvWBVfmJDtrEHHCtkIKeTEb3TTJ4ZOB3wY=
charm.land/bubbletea/v2 v2.0.6 h1:UHN/91OyuhaOFGSrBXQ/hMZD8IO1Uc4BvHlgHXL2WJo=
charm.land/bubbletea/v2 v2.0.6/go.mod h1:MH/D8ZLlN3op37vQvijKuU29g3rqTp+aQapURFonF9g=
charm.land/lipgloss/v2 v2.0.3 h1:yM2zJ4Cf5Y51b7RHIwioil4ApI/aypFXXVHSwlM6RzU=
charm.land/lipgloss/v2 v2.0.3/go.mod h1:7myLU9iG/3xluAWzpY/fSxYYHCgoKTie7laxk6ATwXA=
cloud.google.com/go v0.123.0 h1:2NAUJwPR47q+E35uaJeYoNhuNEM9kM8SjgRgdeOJUSE=
cloud.google.com/go v0.123.0/go.mod h1:xBoMV08QcqUGuPW65Qfm1o9Y4zKZBpGS+7bImXLTAZU=
cloud.google.com/go/auth v0.18.2 h1:+Nbt5Ev0xEqxlNjd6c+yYUeosQ5TtEUaNcN/3FozlaM=
cloud.google.com/go/auth v0.18.2/go.mod h1:xD+oY7gcahcu7G2SG2DsBerfFxgPAJz17zz2joOFF3M=
cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
cloud.google.com/go/iam v1.5.3 h1:+vMINPiDF2ognBJ97ABAYYwRgsaqxPbQDlMnbHMjolc=
cloud.google.com/go/iam v1.5.3/go.mod h1:MR3v9oLkZCTlaqljW6Eb2d3HGDGK5/bDv93jhfISFvU=
cloud.google.com/go/logging v1.13.1 h1:O7LvmO0kGLaHY/gq8cV7T0dyp6zJhYAOtZPX4TF3QtY=
cloud.google.com/go/logging v1.13.1/go.mod h1:XAQkfkMBxQRjQek96WLPNze7vsOmay9H5PqfsNYDqvw=
cloud.google.com/go/longrunning v0.8.0 h1:LiKK77J3bx5gDLi4SMViHixjD2ohlkwBi+mKA7EhfW8=
cloud.google.com/go/longrunning v0.8.0/go.mod h1:UmErU2Onzi+fKDg2gR7dusz11Pe26aknR4kHmJJqIfk=
cloud.google.com/go/monitoring v1.24.3 h1:dde+gMNc0UhPZD1Azu6at2e79bfdztVDS5lvhOdsgaE=
cloud.google.com/go/monitoring v1.24.3/go.mod h1:nYP6W0tm3N9H/bOw8am7t62YTzZY+zUeQ+Bi6+2eonI=
cloud.google.com/go/storage v1.61.3 h1:VS//ZfBuPGDvakfD9xyPW1RGF1Vy3BWUoVZXgW1KMOg=
cloud.google.com/go/storage v1.61.3/go.mod h1:JtqK8BBB7TWv0HVGHubtUdzYYrakOQIsMLffZ2Z/HWk=
cloud.google.com/go/trace v1.11.7 h1:kDNDX8JkaAG3R2nq1lIdkb7FCSi1rCmsEtKVsty7p+U=
cloud.google.com/go/trace v1.11.7/go.mod h1:TNn9d5V3fQVf6s4SCveVMIBS2LJUqo73GACmq/Tky0s=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0 h1:sBEjpZlNHzK1voKq9695PJSX2o5NEXl7/OL3coiIY0c=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.30.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 h1:UnDZ/zFfG1JhH/DqxIZYU/1CUAlTUScoXD/LcM2Ykk8=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0/go.mod h1:IA1C1U7jO/ENqm/vhi7V9YYpBsp+IMyqNrEN94N7tVc=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.55.0 h1:7t/qx5Ost0s0wbA/VDrByOooURhp+ikYwv20i9Y07TQ=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.55.0/go.mod h1:vB2GH9GAYYJTO3mEn8oYwzEdhlayZIdQz6zdzgUIRvA=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.55.0 h1:0s6TxfCu2KHkkZPnBfsQ2y5qia0jl3MMrmBhu3nCOYk=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.55.0/go.mod h1:Mf6O40IAyB9zR/1J8nGDDPirZQQPbYJni8Yisy7NTMc=
github.com/Ladicle/tabwriter v1.0.0 h1:DZQqPvMumBDwVNElso13afjYLNp0Z7pHqHnu0r4t9Dg=
github.com/Ladicle/tabwriter v1.0.0/go.mod h1:c4MdCjxQyTbGuQO/gvqJ+IA/89UEwrsD6hUCW98dyp4=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE=
github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY=
github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o=
github.com/alecthomas/chroma/v2 v2.24.1 h1:m5ffpfZbIb++k8AqFEKy9uVgY12xIQtBsQlc6DfZJQM=
github.com/alecthomas/chroma/v2 v2.24.1/go.mod h1:l+ohZ9xRXIbGe7cIW+YZgOGbvuVLjMps/FYN/CwuabI=
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aws/aws-sdk-go-v2 v1.41.5 h1:dj5kopbwUsVUVFgO4Fi5BIT3t4WyqIDjGKCangnV/yY=
github.com/aws/aws-sdk-go-v2 v1.41.5/go.mod h1:mwsPRE8ceUUpiTgF7QmQIJ7lgsKUPQOUl3o72QBrE1o=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI=
github.com/aws/aws-sdk-go-v2/config v1.32.12 h1:O3csC7HUGn2895eNrLytOJQdoL2xyJy0iYXhoZ1OmP0=
github.com/aws/aws-sdk-go-v2/config v1.32.12/go.mod h1:96zTvoOFR4FURjI+/5wY1vc1ABceROO4lWgWJuxgy0g=
github.com/aws/aws-sdk-go-v2/credentials v1.19.12 h1:oqtA6v+y5fZg//tcTWahyN9PEn5eDU/Wpvc2+kJ4aY8=
github.com/aws/aws-sdk-go-v2/credentials v1.19.12/go.mod h1:U3R1RtSHx6NB0DvEQFGyf/0sbrpJrluENHdPy1j/3TE=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.20 h1:zOgq3uezl5nznfoK3ODuqbhVg1JzAGDUhXOsU0IDCAo=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.20/go.mod h1:z/MVwUARehy6GAg/yQ1GO2IMl0k++cu1ohP9zo887wE=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 h1:Rgg6wvjjtX8bNHcvi9OnXWwcE0a2vGpbwmtICOsvcf4=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21/go.mod h1:A/kJFst/nm//cyqonihbdpQZwiUhhzpqTsdbhDdRF9c=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 h1:PEgGVtPoB6NTpPrBgqSE5hE/o47Ij9qk/SEZFbUOe9A=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21/go.mod h1:p+hz+PRAYlY3zcpJhPwXlLC4C+kqn70WIHwnzAfs6ps=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 h1:qYQ4pzQ2Oz6WpQ8T3HvGHnZydA72MnLuFK9tJwmrbHw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6/go.mod h1:O3h0IK87yXci+kg6flUKzJnWeziQUKciKrLjcatSNcY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 h1:rWyie/PxDRIdhNf4DzRk0lvjVOqFJuNnO8WwaIRVxzQ=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22/go.mod h1:zd/JsJ4P7oGfUhXn1VyLqaRZwPmZwg44Jf2dS84Dm3Y=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 h1:5EniKhLZe4xzL7a+fU3C2tfUN4nWIqlLesfrjkuPFTY=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7/go.mod h1:x0nZssQ3qZSnIcePWLvcoFisRXJzcTVvYpAAdYX8+GI=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 h1:c31//R3xgIJMSC8S6hEVq+38DcvUlgFY0FM6mSI5oto=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21/go.mod h1:r6+pf23ouCB718FUxaqzZdbpYFyDtehyZcmP5KL9FkA=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ=
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3 h1:HwxWTbTrIHm5qY+CAEur0s/figc3qwvLWsNkF4RPToo=
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.3/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM=
github.com/aws/aws-sdk-go-v2/service/signin v1.0.8 h1:0GFOLzEbOyZABS3PhYfBIx2rNBACYcKty+XGkTgw1ow=
github.com/aws/aws-sdk-go-v2/service/signin v1.0.8/go.mod h1:LXypKvk85AROkKhOG6/YEcHFPoX+prKTowKnVdcaIxE=
github.com/aws/aws-sdk-go-v2/service/sso v1.30.13 h1:kiIDLZ005EcKomYYITtfsjn7dtOwHDOFy7IbPXKek2o=
github.com/aws/aws-sdk-go-v2/service/sso v1.30.13/go.mod h1:2h/xGEowcW/g38g06g3KpRWDlT+OTfxxI0o1KqayAB8=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.17 h1:jzKAXIlhZhJbnYwHbvUQZEB8KfgAEuG0dc08Bkda7NU=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.17/go.mod h1:Al9fFsXjv4KfbzQHGe6V4NZSZQXecFcvaIF4e70FoRA=
github.com/aws/aws-sdk-go-v2/service/sts v1.41.9 h1:Cng+OOwCHmFljXIxpEVXAGMnBia8MSU6Ch5i9PgBkcU=
github.com/aws/aws-sdk-go-v2/service/sts v1.41.9/go.mod h1:LrlIndBDdjA/EeXeyNBle+gyCwTlizzW5ycgWnvIxkk=
github.com/aws/smithy-go v1.24.2 h1:FzA3bu/nt/vDvmnkg+R8Xl46gmzEDam6mZ1hzmwXFng=
github.com/aws/smithy-go v1.24.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o=
github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chainguard-dev/git-urls v1.0.2 h1:pSpT7ifrpc5X55n4aTTm7FFUE+ZQHKiqpiwNkJrVcKQ=
github.com/chainguard-dev/git-urls v1.0.2/go.mod h1:rbGgj10OS7UgZlbzdUQIQpT0k/D4+An04HJY7Ol+Y/o=
github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q=
github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q=
github.com/charmbracelet/ultraviolet v0.0.0-20260416155717-489999b90468 h1:Q9fO0y1Zo5KB/5Vu8JZoLGm1N3RzF9bNj3Ao3xoR+Ac=
github.com/charmbracelet/ultraviolet v0.0.0-20260416155717-489999b90468/go.mod h1:bAAz7dh/FTYfC+oiHavL4mX1tOIBZ0ZwYjSi3qE6ivM=
github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI=
github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I=
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI=
github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=
github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM=
github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k=
github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8=
github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0=
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w=
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo=
github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/elliotchance/orderedmap/v3 v3.1.0 h1:j4DJ5ObEmMBt/lcwIecKcoRxIQUEnw0L804lXYDt/pg=
github.com/elliotchance/orderedmap/v3 v3.1.0/go.mod h1:G+Hc2RwaZvJMcS4JpGCOyViCnGeKf0bTYCGTO4uhjSo=
github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA=
github.com/envoyproxy/go-control-plane v0.14.0/go.mod h1:NcS5X47pLl/hfqxU70yPwL9ZMkUlwlKxtAohpi2wBEU=
github.com/envoyproxy/go-control-plane/envoy v1.36.0 h1:yg/JjO5E7ubRyKX3m07GF3reDNEnfOboJ0QySbH736g=
github.com/envoyproxy/go-control-plane/envoy v1.36.0/go.mod h1:ty89S1YCCVruQAm9OtKeEkQLTb+Lkz0k8v9W0Oxsv98=
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI=
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4=
github.com/envoyproxy/protoc-gen-validate v1.3.0 h1:TvGH1wof4H33rezVKWSpqKz5NXWg5VPuZ0uONDT6eb4=
github.com/envoyproxy/protoc-gen-validate v1.3.0/go.mod h1:HvYl7zwPa5mffgyeTUHA9zHIH36nmrm7oCbo4YKoSWA=
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho=
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/go-task/template v0.2.0 h1:xW7ek0o65FUSTbKcSNeg2Vyf/I7wYXFgLUznptvviBE=
github.com/go-task/template v0.2.0/go.mod h1:dbdoUb6qKnHQi1y6o+IdIrs0J4o/SEhSTA6bbzZmdtc=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=
github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0=
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.3.14 h1:yh8ncqsbUY4shRD5dA6RlzjJaT4hi3kII+zYw8wmLb8=
github.com/googleapis/enterprise-certificate-proxy v0.3.14/go.mod h1:vqVt9yG9480NtzREnTlmGSBmFrA+bzb0yl0TxoBQXOg=
github.com/googleapis/gax-go/v2 v2.17.0 h1:RksgfBpxqff0EZkDWYuz9q/uWsTVz+kf43LsZ1J6SMc=
github.com/googleapis/gax-go/v2 v2.17.0/go.mod h1:mzaqghpQp4JDh3HvADwrat+6M3MOIDp5YKHhb9PAgDY=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.72 h1:vTCWu1wbdYo7PEZFem/rlr01+Un+wwVmI7wiegFdRLk=
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.72/go.mod h1:Vn+BBgKQHVQYdVQ4NZDICE1Brb+JfaONyDHr3q07oQc=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-getter v1.8.6 h1:9sQboWULaydVphxc4S64oAI4YqpuCk7nPmvbk131ebY=
github.com/hashicorp/go-getter v1.8.6/go.mod h1:nVH12eOV2P58dIiL3rsU6Fh3wLeJEKBOJzhMmzlSWoo=
github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4=
github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-zglob v0.0.1 h1:xsEx/XUoVlI6yXjqBK062zYhRTZltCNmYPx6v+8DNaY=
github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo=
github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4=
github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/radovskyb/watcher v1.0.5 h1:wqt7gb+HjGacvFoLTKeT44C+XVPxu7bvHvKT1IvZ7rw=
github.com/radovskyb/watcher v1.0.5/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/puzpuzpuz/xsync/v4 v4.5.0 h1:vOSWu6b57/emh+L/Cw0BeQfvxa/cogFywXHeGUxQxAg=
github.com/puzpuzpuz/xsync/v4 v4.5.0/go.mod h1:VJDmTCJMBt8igNxnkQd86r+8KUeN1quSfNKu5bLYFQo=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/sajari/fuzzy v1.0.0 h1:+FmwVvJErsd0d0hAPlj4CxqxUtQY/fOoY0DwX4ykpRY=
github.com/sajari/fuzzy v1.0.0/go.mod h1:OjYR6KxoWOe9+dOlXeiCJd4dIbED4Oo8wpS89o0pwOo=
github.com/sebdah/goldie/v2 v2.8.0 h1:dZb9wR8q5++oplmEiJT+U/5KyotVD+HNGCAc5gNr8rc=
github.com/sebdah/goldie/v2 v2.8.0/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo=
github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418 h1:HlFl4V6pEMziuLXyRkm5BIYq1y1GAbb02pRlWvI54OM=
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20191110171634-ad39bd3f0407 h1:5zh5atpUEdIc478E/ebrIaHLKcfVvG6dL/fGv7BcMoM=
golang.org/x/term v0.0.0-20191110171634-ad39bd3f0407/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/u-root/u-root v0.15.1-0.20251208185023-2f8c7e763cf8 h1:cq+DjLAjz3ZPwh0+G571O/jMH0c0DzReDPLjQGL2/BA=
github.com/u-root/u-root v0.15.1-0.20251208185023-2f8c7e763cf8/go.mod h1:JNauIV2zopCBv/6o+umxcT3bKe8YUqYJaTZQYSYpKss=
github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701 h1:pyC9PaHYZFgEKFdlp3G8RaCKgVpHZnecvArXvPXcFkM=
github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701/go.mod h1:P3a5rG4X7tI17Nn3aOIAYr5HbIMukwXG0urG0WuL8OA=
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 h1:kWRNZMsfBHZ+uHjiH4y7Etn2FK26LAGkNFw7RHv1DhE=
go.opentelemetry.io/contrib/detectors/gcp v1.39.0/go.mod h1:t/OGqzHBa5v6RHZwrDBJ2OirWc+4q/w2fTbLZwAKjTk=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0 h1:ZrPRak/kS4xI3AVXy8F7pipuDXmDsrO8Lg+yQjBLjw0=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0/go.mod h1:3y6kQCWztq6hyW8Z9YxQDDm0Je9AJoFar2G0yDcmhRk=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI=
golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM=
golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=
golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.43.0 h1:S4RLU2sB31O/NCl+zFN9Aru9A/Cq2aqKpTZJ6B+DwT4=
golang.org/x/term v0.43.0/go.mod h1:lrhlHNdQJHO+1qVYiHfFKVuVioJIheAc3fBSMFYEIsk=
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U=
golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/api v0.271.0 h1:cIPN4qcUc61jlh7oXu6pwOQqbJW2GqYh5PS6rB2C/JY=
google.golang.org/api v0.271.0/go.mod h1:CGT29bhwkbF+i11qkRUJb2KMKqcJ1hdFceEIRd9u64Q=
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 h1:VQZ/yAbAtjkHgH80teYd2em3xtIkkHd7ZhqfH2N9CsM=
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409/go.mod h1:rxKD3IEILWEu3P44seeNOAwZN4SaoKaQ/2eTg4mM6EM=
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20 h1:7ei4lp52gK1uSejlA8AZl5AJjeLUOHBQscRQZUgAcu0=
google.golang.org/genproto/googleapis/api v0.0.0-20260203192932-546029d2fa20/go.mod h1:ZdbssH/1SOVnjnDlXzxDHK2MCidiqXtbYccJNzNYPEE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 h1:ggcbiqK8WWh6l1dnltU4BgWGIGo+EVYxCaAPih/zQXQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE=
google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
mvdan.cc/editorconfig v0.1.1-0.20200121172147-e40951bde157/go.mod h1:Ge4atmRUYqueGppvJ7JNrtqpqokoJEFxYbP0Z+WeKS8=
mvdan.cc/sh/v3 v3.2.1 h1:uQBpiGM+rEuHse3Q+W7ajuJUeOtFVJUN/6GeX4/dUWE=
mvdan.cc/sh/v3 v3.2.1/go.mod h1:fPQmabBpREM/XQ9YXSU5ZFZ/Sm+PmKP9/vkFHgYKJEI=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
mvdan.cc/sh/moreinterp v0.0.0-20260120230322-19def062a997 h1:3bbJwtPFh98dJ6lxRdR3eLHTH1CmR3BcU6TriIMiXjE=
mvdan.cc/sh/moreinterp v0.0.0-20260120230322-19def062a997/go.mod h1:Qy/zdaMDxq9sT72Gi43K3gsV+TtTohyDO3f1cyBVwuo=
mvdan.cc/sh/v3 v3.13.2-0.20260503214111-9e7dd28c81cf h1:3mGRe/xSr7fd9m+c5FSab/CSCtADsbdMcyhYGdVR6DY=
mvdan.cc/sh/v3 v3.13.2-0.20260503214111-9e7dd28c81cf/go.mod h1:lXJ8SexMvEVcHCoDvAGLZgFJ9Wsm2sulmoNEXGhYZD0=
mvdan.cc/sh/v3 v3.13.2-0.20260510185049-f5c6e2779117 h1:BfzdGSjcnJBb8sPNLudpzTml8zFUxS1N0N/v9IIS6tQ=
mvdan.cc/sh/v3 v3.13.2-0.20260510185049-f5c6e2779117/go.mod h1:lXJ8SexMvEVcHCoDvAGLZgFJ9Wsm2sulmoNEXGhYZD0=

25
hash.go Normal file
View File

@@ -0,0 +1,25 @@
package task
import (
"cmp"
"fmt"
"github.com/go-task/task/v3/internal/hash"
"github.com/go-task/task/v3/taskfile/ast"
)
func (e *Executor) GetHash(t *ast.Task) (string, error) {
r := cmp.Or(t.Run, e.Taskfile.Run)
var h hash.HashFunc
switch r {
case "always":
h = hash.Empty
case "once":
h = hash.Name
case "when_changed":
h = hash.Hash
default:
return "", fmt.Errorf(`task: invalid run "%s"`, r)
}
return h(t)
}

204
help.go
View File

@@ -1,42 +1,200 @@
package task
import (
"context"
"encoding/json"
"fmt"
"sort"
"text/tabwriter"
"io"
"os"
"strings"
"github.com/Ladicle/tabwriter"
"golang.org/x/sync/errgroup"
"github.com/go-task/task/v3/internal/editors"
"github.com/go-task/task/v3/internal/fingerprint"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/taskfile"
"github.com/go-task/task/v3/internal/sort"
"github.com/go-task/task/v3/taskfile/ast"
)
// PrintTasksHelp prints help os tasks that have a description
func (e *Executor) PrintTasksHelp() {
tasks := e.tasksWithDesc()
if len(tasks) == 0 {
e.Logger.Outf(logger.Yellow, "task: No tasks with description available")
return
// ListOptions collects list-related options
type ListOptions struct {
ListOnlyTasksWithDescriptions bool
ListAllTasks bool
FormatTaskListAsJSON bool
NoStatus bool
Nested bool
}
// NewListOptions creates a new ListOptions instance
func NewListOptions(list, listAll, listAsJson, noStatus, nested bool) ListOptions {
return ListOptions{
ListOnlyTasksWithDescriptions: list,
ListAllTasks: listAll,
FormatTaskListAsJSON: listAsJson,
NoStatus: noStatus,
Nested: nested,
}
e.Logger.Outf(logger.Default, "task: Available tasks for this project:")
}
// ShouldListTasks returns true if one of the options to list tasks has been set to true
func (o ListOptions) ShouldListTasks() bool {
return o.ListOnlyTasksWithDescriptions || o.ListAllTasks
}
// Filters returns the slice of FilterFunc which filters a list
// of ast.Task according to the given ListOptions
func (o ListOptions) Filters() []FilterFunc {
filters := []FilterFunc{FilterOutInternal}
if o.ListOnlyTasksWithDescriptions {
filters = append(filters, FilterOutNoDesc)
}
return filters
}
// ListTasks prints a list of tasks.
// Tasks that match the given filters will be excluded from the list.
// The function returns a boolean indicating whether tasks were found
// and an error if one was encountered while preparing the output.
func (e *Executor) ListTasks(o ListOptions) (bool, error) {
tasks, err := e.GetTaskList(o.Filters()...)
if err != nil {
return false, err
}
if o.FormatTaskListAsJSON {
output, err := e.ToEditorOutput(tasks, o.NoStatus, o.Nested)
if err != nil {
return false, err
}
encoder := json.NewEncoder(e.Stdout)
encoder.SetIndent("", " ")
if err := encoder.Encode(output); err != nil {
return false, err
}
return len(tasks) > 0, nil
}
if len(tasks) == 0 {
if o.ListOnlyTasksWithDescriptions {
e.Logger.Outf(logger.Yellow, "task: No tasks with description available. Try --list-all to list all tasks\n")
} else if o.ListAllTasks {
e.Logger.Outf(logger.Yellow, "task: No tasks available\n")
}
return false, nil
}
e.Logger.Outf(logger.Default, "task: Available tasks for this project:\n")
// Format in tab-separated columns with a tab stop of 8.
w := tabwriter.NewWriter(e.Stdout, 0, 8, 0, '\t', 0)
w := tabwriter.NewWriter(e.Stdout, 0, 8, 6, ' ', 0)
for _, task := range tasks {
fmt.Fprintf(w, "* %s: \t%s\n", task.Name(), task.Desc)
e.Logger.FOutf(w, logger.Yellow, "* ")
e.Logger.FOutf(w, logger.Green, task.Task)
desc := strings.ReplaceAll(task.Desc, "\n", " ")
e.Logger.FOutf(w, logger.Default, ": \t%s", desc)
if len(task.Aliases) > 0 {
e.Logger.FOutf(w, logger.Cyan, "\t(aliases: %s)", strings.Join(task.Aliases, ", "))
}
_, _ = fmt.Fprint(w, "\n")
}
w.Flush()
if err := w.Flush(); err != nil {
return false, err
}
return true, nil
}
func (e *Executor) tasksWithDesc() (tasks []*taskfile.Task) {
tasks = make([]*taskfile.Task, 0, len(e.Taskfile.Tasks))
for _, task := range e.Taskfile.Tasks {
if task.Desc != "" {
compiledTask, err := e.FastCompiledTask(taskfile.Call{Task: task.Task})
if err == nil {
task = compiledTask
// ListTaskNames prints only the task names in a Taskfile.
// Only tasks with a non-empty description are printed if allTasks is false.
// Otherwise, all task names are printed.
func (e *Executor) ListTaskNames(allTasks bool) error {
// use stdout if no output defined
var w io.Writer = os.Stdout
if e.Stdout != nil {
w = e.Stdout
}
// Sort the tasks
if e.TaskSorter == nil {
e.TaskSorter = sort.AlphaNumericWithRootTasksFirst
}
// Create a list of task names
taskNames := make([]string, 0, e.Taskfile.Tasks.Len())
for task := range e.Taskfile.Tasks.Values(e.TaskSorter) {
if (allTasks || task.Desc != "") && !task.Internal {
taskNames = append(taskNames, strings.TrimRight(task.Task, ":"))
for _, alias := range task.Aliases {
taskNames = append(taskNames, strings.TrimRight(alias, ":"))
}
tasks = append(tasks, task)
}
}
sort.Slice(tasks, func(i, j int) bool { return tasks[i].Task < tasks[j].Task })
return
for _, t := range taskNames {
fmt.Fprintln(w, t)
}
return nil
}
func (e *Executor) ToEditorOutput(tasks []*ast.Task, noStatus bool, nested bool) (*editors.Namespace, error) {
var g errgroup.Group
editorTasks := make([]editors.Task, len(tasks))
// Look over each task in parallel and turn it into an editor task
for i := range tasks {
g.Go(func() error {
editorTask := editors.NewTask(tasks[i])
if noStatus {
editorTasks[i] = editorTask
return nil
}
// Get the fingerprinting method to use
method := e.Taskfile.Method
if tasks[i].Method != "" {
method = tasks[i].Method
}
upToDate, err := fingerprint.IsTaskUpToDate(context.Background(), tasks[i],
fingerprint.WithMethod(method),
fingerprint.WithTempDir(e.TempDir.Fingerprint),
fingerprint.WithDry(e.Dry),
fingerprint.WithLogger(e.Logger),
)
if err != nil {
return err
}
editorTask.UpToDate = &upToDate
editorTasks[i] = editorTask
return nil
})
}
if err := g.Wait(); err != nil {
return nil, err
}
// Create the root namespace
var tasksLen int
if !nested {
tasksLen = len(editorTasks)
}
rootNamespace := &editors.Namespace{
Tasks: make([]editors.Task, tasksLen),
Location: e.Taskfile.Location,
}
// Recursively add namespaces to the root namespace or if nesting is
// disabled add them all to the root namespace
for i, task := range editorTasks {
taskNamespacePath := strings.Split(task.Task, ast.NamespaceSeparator)
if nested {
rootNamespace.AddNamespace(taskNamespacePath, task)
} else {
rootNamespace.Tasks[i] = task
}
}
return rootNamespace, g.Wait()
}

64
init.go
View File

@@ -1,38 +1,50 @@
package task
import (
"fmt"
"io"
"io/ioutil"
_ "embed"
"os"
"path/filepath"
"github.com/go-task/task/v3/errors"
"github.com/go-task/task/v3/internal/filepathext"
"github.com/go-task/task/v3/taskfile"
)
const defaultTaskfile = `# https://taskfile.dev
const defaultFilename = "Taskfile.yml"
version: '3'
//go:embed taskfile/templates/default.yml
var DefaultTaskfile string
vars:
GREETING: Hello, World!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
`
// InitTaskfile Taskfile creates a new Taskfile
func InitTaskfile(w io.Writer, dir string) error {
f := filepath.Join(dir, "Taskfile.yml")
if _, err := os.Stat(f); err == nil {
return ErrTaskfileAlreadyExists
// InitTaskfile creates a new Taskfile at path.
//
// path can be either a file path or a directory path.
// If path is a directory, path/Taskfile.yml will be created.
//
// The final file path is always returned and may be different from the input path.
func InitTaskfile(path string) (string, error) {
info, err := os.Stat(path)
if err == nil && !info.IsDir() {
return path, errors.TaskfileAlreadyExistsError{}
}
if err := ioutil.WriteFile(f, []byte(defaultTaskfile), 0644); err != nil {
return err
if info != nil && info.IsDir() {
// path was a directory, check if there is a Taskfile already
if hasDefaultTaskfile(path) {
return path, errors.TaskfileAlreadyExistsError{}
}
path = filepathext.SmartJoin(path, defaultFilename)
}
fmt.Fprintf(w, "Taskfile.yml created in the current directory\n")
return nil
if err := os.WriteFile(path, []byte(DefaultTaskfile), 0o644); err != nil {
return path, err
}
return path, nil
}
func hasDefaultTaskfile(dir string) bool {
for _, name := range taskfile.DefaultTaskfiles {
if _, err := os.Stat(filepathext.SmartJoin(dir, name)); err == nil {
return true
}
}
return false
}

52
init_test.go Normal file
View File

@@ -0,0 +1,52 @@
package task_test
import (
"os"
"testing"
"github.com/go-task/task/v3"
"github.com/go-task/task/v3/internal/filepathext"
)
func TestInitDir(t *testing.T) {
t.Parallel()
const dir = "testdata/init"
file := filepathext.SmartJoin(dir, "Taskfile.yml")
_ = os.Remove(file)
if _, err := os.Stat(file); err == nil {
t.Errorf("Taskfile.yml should not exist")
}
if _, err := task.InitTaskfile(dir); err != nil {
t.Error(err)
}
if _, err := os.Stat(file); err != nil {
t.Errorf("Taskfile.yml should exist")
}
_ = os.Remove(file)
}
func TestInitFile(t *testing.T) {
t.Parallel()
const dir = "testdata/init"
file := filepathext.SmartJoin(dir, "Tasks.yml")
_ = os.Remove(file)
if _, err := os.Stat(file); err == nil {
t.Errorf("Tasks.yml should not exist")
}
if _, err := task.InitTaskfile(file); err != nil {
t.Error(err)
}
if _, err := os.Stat(file); err != nil {
t.Errorf("Tasks.yml should exist")
}
_ = os.Remove(file)
}

View File

@@ -64,15 +64,15 @@ get_binaries() {
case "$PLATFORM" in
darwin/amd64) BINARIES="task" ;;
darwin/arm64) BINARIES="task" ;;
darwin/armv6) BINARIES="task" ;;
darwin/arm) BINARIES="task" ;;
linux/386) BINARIES="task" ;;
linux/amd64) BINARIES="task" ;;
linux/arm64) BINARIES="task" ;;
linux/armv6) BINARIES="task" ;;
linux/arm) BINARIES="task" ;;
windows/386) BINARIES="task" ;;
windows/amd64) BINARIES="task" ;;
windows/arm64) BINARIES="task" ;;
windows/armv6) BINARIES="task" ;;
windows/arm) BINARIES="task" ;;
*)
log_crit "platform $PLATFORM is not supported. Make sure this script is up-to-date and file request at https://github.com/${PREFIX}/issues/new"
exit 1
@@ -184,9 +184,9 @@ uname_arch() {
i686) arch="386" ;;
i386) arch="386" ;;
aarch64) arch="arm64" ;;
armv5*) arch="armv5" ;;
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
armv5*) arch="arm" ;;
armv6*) arch="arm" ;;
armv7*) arch="arm" ;;
esac
echo ${arch}
}
@@ -214,9 +214,7 @@ uname_arch_check() {
386) return 0 ;;
amd64) return 0 ;;
arm64) return 0 ;;
armv5) return 0 ;;
armv6) return 0 ;;
armv7) return 0 ;;
arm) return 0 ;;
ppc64) return 0 ;;
ppc64le) return 0 ;;
mips) return 0 ;;

View File

@@ -1,14 +0,0 @@
package compiler
import (
"github.com/go-task/task/v3/taskfile"
)
// Compiler handles compilation of a task before its execution.
// E.g. variable merger, template processing, etc.
type Compiler interface {
GetVariables(t *taskfile.Task, call taskfile.Call) (*taskfile.Vars, error)
FastGetVariables(t *taskfile.Task, call taskfile.Call) (*taskfile.Vars, error)
HandleDynamicVar(v taskfile.Var, dir string) (string, error)
ResetCache()
}

View File

@@ -1,20 +0,0 @@
package compiler
import (
"os"
"strings"
"github.com/go-task/task/v3/taskfile"
)
// GetEnviron the all return all environment variables encapsulated on a
// taskfile.Vars
func GetEnviron() *taskfile.Vars {
m := &taskfile.Vars{}
for _, e := range os.Environ() {
keyVal := strings.SplitN(e, "=", 2)
key, val := keyVal[0], keyVal[1]
m.Set(key, taskfile.Var{Static: val})
}
return m
}

View File

@@ -1,127 +0,0 @@
package v2
import (
"bytes"
"context"
"fmt"
"strings"
"sync"
"github.com/go-task/task/v3/internal/compiler"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/templater"
"github.com/go-task/task/v3/taskfile"
)
var _ compiler.Compiler = &CompilerV2{}
type CompilerV2 struct {
Dir string
Taskvars *taskfile.Vars
TaskfileVars *taskfile.Vars
Expansions int
Logger *logger.Logger
dynamicCache map[string]string
muDynamicCache sync.Mutex
}
// FastGetVariables is a no-op on v2
func (c *CompilerV2) FastGetVariables(t *taskfile.Task, call taskfile.Call) (*taskfile.Vars, error) {
return c.GetVariables(t, call)
}
// GetVariables returns fully resolved variables following the priority order:
// 1. Task variables
// 2. Call variables
// 3. Taskfile variables
// 4. Taskvars file variables
// 5. Environment variables
func (c *CompilerV2) GetVariables(t *taskfile.Task, call taskfile.Call) (*taskfile.Vars, error) {
vr := varResolver{
c: c,
vars: compiler.GetEnviron(),
}
vr.vars.Set("TASK", taskfile.Var{Static: t.Task})
for _, vars := range []*taskfile.Vars{c.Taskvars, c.TaskfileVars, call.Vars, t.Vars} {
for i := 0; i < c.Expansions; i++ {
vr.merge(vars)
}
}
return vr.vars, vr.err
}
type varResolver struct {
c *CompilerV2
vars *taskfile.Vars
err error
}
func (vr *varResolver) merge(vars *taskfile.Vars) {
if vr.err != nil {
return
}
tr := templater.Templater{Vars: vr.vars}
vars.Range(func(k string, v taskfile.Var) error {
v = taskfile.Var{
Static: tr.Replace(v.Static),
Sh: tr.Replace(v.Sh),
}
static, err := vr.c.HandleDynamicVar(v, "")
if err != nil {
vr.err = err
return err
}
vr.vars.Set(k, taskfile.Var{Static: static})
return nil
})
vr.err = tr.Err()
}
func (c *CompilerV2) HandleDynamicVar(v taskfile.Var, _ string) (string, error) {
if v.Static != "" || v.Sh == "" {
return v.Static, nil
}
c.muDynamicCache.Lock()
defer c.muDynamicCache.Unlock()
if c.dynamicCache == nil {
c.dynamicCache = make(map[string]string, 30)
}
if result, ok := c.dynamicCache[v.Sh]; ok {
return result, nil
}
var stdout bytes.Buffer
opts := &execext.RunCommandOptions{
Command: v.Sh,
Stdout: &stdout,
Stderr: c.Logger.Stderr,
}
if err := execext.RunCommand(context.Background(), opts); err != nil {
return "", fmt.Errorf(`task: Command "%s" in taskvars file failed: %s`, opts.Command, err)
}
// Trim a single trailing newline from the result to make most command
// output easier to use in shell commands.
result := strings.TrimSuffix(stdout.String(), "\n")
c.dynamicCache[v.Sh] = result
c.Logger.VerboseErrf(logger.Magenta, `task: dynamic variable: '%s' result: '%s'`, v.Sh, result)
return result, nil
}
// ResetCache clear the dymanic variables cache
func (c *CompilerV2) ResetCache() {
c.muDynamicCache.Lock()
defer c.muDynamicCache.Unlock()
c.dynamicCache = nil
}

View File

@@ -1,147 +0,0 @@
package v3
import (
"bytes"
"context"
"fmt"
"path/filepath"
"strings"
"sync"
"github.com/go-task/task/v3/internal/compiler"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/templater"
"github.com/go-task/task/v3/taskfile"
)
var _ compiler.Compiler = &CompilerV3{}
type CompilerV3 struct {
Dir string
TaskfileEnv *taskfile.Vars
TaskfileVars *taskfile.Vars
Logger *logger.Logger
dynamicCache map[string]string
muDynamicCache sync.Mutex
}
func (c *CompilerV3) GetVariables(t *taskfile.Task, call taskfile.Call) (*taskfile.Vars, error) {
return c.getVariables(t, call, true)
}
func (c *CompilerV3) FastGetVariables(t *taskfile.Task, call taskfile.Call) (*taskfile.Vars, error) {
return c.getVariables(t, call, false)
}
func (c *CompilerV3) getVariables(t *taskfile.Task, call taskfile.Call, evaluateShVars bool) (*taskfile.Vars, error) {
result := compiler.GetEnviron()
result.Set("TASK", taskfile.Var{Static: t.Task})
getRangeFunc := func(dir string) func(k string, v taskfile.Var) error {
return func(k string, v taskfile.Var) error {
tr := templater.Templater{Vars: result, RemoveNoValue: true}
if !evaluateShVars {
result.Set(k, taskfile.Var{Static: tr.Replace(v.Static)})
return nil
}
v = taskfile.Var{
Static: tr.Replace(v.Static),
Sh: tr.Replace(v.Sh),
Dir: v.Dir,
}
if err := tr.Err(); err != nil {
return err
}
static, err := c.HandleDynamicVar(v, dir)
if err != nil {
return err
}
result.Set(k, taskfile.Var{Static: static})
return nil
}
}
rangeFunc := getRangeFunc(c.Dir)
if err := c.TaskfileEnv.Range(rangeFunc); err != nil {
return nil, err
}
if err := c.TaskfileVars.Range(rangeFunc); err != nil {
return nil, err
}
if err := call.Vars.Range(rangeFunc); err != nil {
return nil, err
}
// NOTE(@andreynering): We're manually joining these paths here because
// this is the raw task, not the compiled one.
tr := templater.Templater{Vars: result, RemoveNoValue: true}
dir := tr.Replace(t.Dir)
if err := tr.Err(); err != nil {
return nil, err
}
if !filepath.IsAbs(dir) {
dir = filepath.Join(c.Dir, dir)
}
taskRangeFunc := getRangeFunc(dir)
if err := t.Vars.Range(taskRangeFunc); err != nil {
return nil, err
}
return result, nil
}
func (c *CompilerV3) HandleDynamicVar(v taskfile.Var, dir string) (string, error) {
if v.Static != "" || v.Sh == "" {
return v.Static, nil
}
c.muDynamicCache.Lock()
defer c.muDynamicCache.Unlock()
if c.dynamicCache == nil {
c.dynamicCache = make(map[string]string, 30)
}
if result, ok := c.dynamicCache[v.Sh]; ok {
return result, nil
}
// NOTE(@andreynering): If a var have a specific dir, use this instead
if v.Dir != "" {
dir = v.Dir
}
var stdout bytes.Buffer
opts := &execext.RunCommandOptions{
Command: v.Sh,
Dir: dir,
Stdout: &stdout,
Stderr: c.Logger.Stderr,
}
if err := execext.RunCommand(context.Background(), opts); err != nil {
return "", fmt.Errorf(`task: Command "%s" in taskvars file failed: %s`, opts.Command, err)
}
// Trim a single trailing newline from the result to make most command
// output easier to use in shell commands.
result := strings.TrimSuffix(stdout.String(), "\n")
c.dynamicCache[v.Sh] = result
c.Logger.VerboseErrf(logger.Magenta, `task: dynamic variable: '%s' result: '%s'`, v.Sh, result)
return result, nil
}
// ResetCache clear the dymanic variables cache
func (c *CompilerV3) ResetCache() {
c.muDynamicCache.Lock()
defer c.muDynamicCache.Unlock()
c.dynamicCache = nil
}

View File

@@ -0,0 +1,167 @@
package deepcopy
import (
"reflect"
"github.com/elliotchance/orderedmap/v3"
)
type Copier[T any] interface {
DeepCopy() T
}
func Scalar[T any](orig *T) *T {
if orig == nil {
return nil
} else {
v := *orig
return &v
}
}
func Slice[T any](orig []T) []T {
if orig == nil {
return nil
}
c := make([]T, len(orig))
for i, v := range orig {
if copyable, ok := any(v).(Copier[T]); ok {
c[i] = copyable.DeepCopy()
} else {
c[i] = v
}
}
return c
}
func Map[K comparable, V any](orig map[K]V) map[K]V {
if orig == nil {
return nil
}
c := make(map[K]V, len(orig))
for k, v := range orig {
if copyable, ok := any(v).(Copier[V]); ok {
c[k] = copyable.DeepCopy()
} else {
c[k] = v
}
}
return c
}
func OrderedMap[K comparable, V any](orig *orderedmap.OrderedMap[K, V]) *orderedmap.OrderedMap[K, V] {
if orig.Len() == 0 {
return orderedmap.NewOrderedMap[K, V]()
}
c := orderedmap.NewOrderedMap[K, V]()
for pair := orig.Front(); pair != nil; pair = pair.Next() {
if copyable, ok := any(pair.Value).(Copier[V]); ok {
c.Set(pair.Key, copyable.DeepCopy())
} else {
c.Set(pair.Key, pair.Value)
}
}
return c
}
// TraverseStringsFunc runs the given function on every string in the given
// value by traversing it recursively. If the given value is a string, the
// function will run on a copy of the string and return it. If the value is a
// struct, map or a slice, the function will recursively call itself for each
// field or element of the struct, map or slice until all strings inside the
// struct or slice are replaced.
func TraverseStringsFunc[T any](v T, fn func(v string) (string, error)) (T, error) {
original := reflect.ValueOf(v)
if original.Kind() == reflect.Invalid || !original.IsValid() {
return v, nil
}
copy := reflect.New(original.Type()).Elem()
var traverseFunc func(copy, v reflect.Value) error
traverseFunc = func(copy, v reflect.Value) error {
switch v.Kind() {
case reflect.Pointer:
// Unwrap the pointer
originalValue := v.Elem()
// If the pointer is nil, do nothing
if !originalValue.IsValid() {
return nil
}
// Create an empty copy from the original value's type
copy.Set(reflect.New(originalValue.Type()))
// Unwrap the newly created pointer and call traverseFunc recursively
if err := traverseFunc(copy.Elem(), originalValue); err != nil {
return err
}
case reflect.Interface:
// Unwrap the interface
originalValue := v.Elem()
if !originalValue.IsValid() {
return nil
}
// Create an empty copy from the original value's type
copyValue := reflect.New(originalValue.Type()).Elem()
// Unwrap the newly created pointer and call traverseFunc recursively
if err := traverseFunc(copyValue, originalValue); err != nil {
return err
}
copy.Set(copyValue)
case reflect.Struct:
// Loop over each field and call traverseFunc recursively
for i := range v.NumField() {
if err := traverseFunc(copy.Field(i), v.Field(i)); err != nil {
return err
}
}
case reflect.Slice:
// Create an empty copy from the original value's type
copy.Set(reflect.MakeSlice(v.Type(), v.Len(), v.Cap()))
// Loop over each element and call traverseFunc recursively
for i := range v.Len() {
if err := traverseFunc(copy.Index(i), v.Index(i)); err != nil {
return err
}
}
case reflect.Map:
// Create an empty copy from the original value's type
copy.Set(reflect.MakeMap(v.Type()))
// Loop over each key
for _, key := range v.MapKeys() {
// Create a copy of each map index
originalValue := v.MapIndex(key)
if originalValue.IsNil() {
continue
}
copyValue := reflect.New(originalValue.Type()).Elem()
// Call traverseFunc recursively
if err := traverseFunc(copyValue, originalValue); err != nil {
return err
}
copy.SetMapIndex(key, copyValue)
}
case reflect.String:
rv, err := fn(v.String())
if err != nil {
return err
}
copy.Set(reflect.ValueOf(rv))
default:
copy.Set(v)
}
return nil
}
if err := traverseFunc(copy, original); err != nil {
return v, err
}
return copy.Interface().(T), nil
}

View File

@@ -0,0 +1,86 @@
package editors
import (
"github.com/go-task/task/v3/taskfile/ast"
)
type (
// Namespace wraps task list output for use in editor integrations (e.g. VSCode, etc)
Namespace struct {
Tasks []Task `json:"tasks"`
Namespaces map[string]*Namespace `json:"namespaces,omitempty"`
Location string `json:"location,omitempty"`
}
// Task describes a single task
Task struct {
Name string `json:"name"`
Task string `json:"task"`
Desc string `json:"desc"`
Summary string `json:"summary"`
Aliases []string `json:"aliases"`
UpToDate *bool `json:"up_to_date,omitempty"`
Location *Location `json:"location"`
}
// Location describes a task's location in a taskfile
Location struct {
Line int `json:"line"`
Column int `json:"column"`
Taskfile string `json:"taskfile"`
}
)
func NewTask(task *ast.Task) Task {
aliases := []string{}
if len(task.Aliases) > 0 {
aliases = task.Aliases
}
return Task{
Name: task.Name(),
Task: task.Task,
Desc: task.Desc,
Summary: task.Summary,
Aliases: aliases,
Location: &Location{
Line: task.Location.Line,
Column: task.Location.Column,
Taskfile: task.Location.Taskfile,
},
}
}
func (parent *Namespace) AddNamespace(namespacePath []string, task Task) {
if len(namespacePath) == 0 {
return
}
// If there are no child namespaces, then we have found a task and we can
// simply add it to the current namespace
if len(namespacePath) == 1 {
parent.Tasks = append(parent.Tasks, task)
return
}
// Get the key of the current namespace in the path
namespaceKey := namespacePath[0]
// Add the namespace to the parent namespaces map using the namespace key
if parent.Namespaces == nil {
parent.Namespaces = make(map[string]*Namespace, 0)
}
// Search for the current namespace in the parent namespaces map
// If it doesn't exist, create it
namespace, ok := parent.Namespaces[namespaceKey]
if !ok {
namespace = &Namespace{}
parent.Namespaces[namespaceKey] = namespace
}
// Remove the current namespace key from the namespace path.
childNamespacePath := namespacePath[1:]
// If there are no child namespaces in the task name, then we have found the
// namespace of the task and we can add it to the current namespace.
// Otherwise, we need to go deeper
namespace.AddNamespace(childNamespacePath, task)
}

125
internal/env/env.go vendored Normal file
View File

@@ -0,0 +1,125 @@
package env
import (
"fmt"
"os"
"strconv"
"strings"
"time"
"github.com/go-task/task/v3/experiments"
"github.com/go-task/task/v3/taskfile/ast"
)
const taskVarPrefix = "TASK_"
// GetEnviron the all return all environment variables encapsulated on a
// ast.Vars
func GetEnviron() *ast.Vars {
m := ast.NewVars()
for _, e := range os.Environ() {
keyVal := strings.SplitN(e, "=", 2)
key, val := keyVal[0], keyVal[1]
m.Set(key, ast.Var{Value: val})
}
return m
}
func Get(t *ast.Task) []string {
if t.Env == nil {
return nil
}
return GetFromVars(t.Env)
}
func GetFromVars(env *ast.Vars) []string {
environ := os.Environ()
for k, v := range env.ToCacheMap() {
if !isTypeAllowed(v) {
continue
}
if !experiments.EnvPrecedence.Enabled() {
if _, alreadySet := os.LookupEnv(k); alreadySet {
continue
}
}
environ = append(environ, fmt.Sprintf("%s=%v", k, v))
}
return environ
}
func isTypeAllowed(v any) bool {
switch v.(type) {
case string, bool, int, float32, float64:
return true
default:
return false
}
}
func GetTaskEnv(key string) string {
return os.Getenv(taskVarPrefix + key)
}
// GetTaskEnvBool returns the boolean value of a TASK_ prefixed env var.
// Returns the value and true if set and valid, or false and false if not set or invalid.
func GetTaskEnvBool(key string) (bool, bool) {
v := GetTaskEnv(key)
if v == "" {
return false, false
}
b, err := strconv.ParseBool(v)
return b, err == nil
}
// GetTaskEnvInt returns the integer value of a TASK_ prefixed env var.
// Returns the value and true if set and valid, or 0 and false if not set or invalid.
func GetTaskEnvInt(key string) (int, bool) {
v := GetTaskEnv(key)
if v == "" {
return 0, false
}
i, err := strconv.Atoi(v)
return i, err == nil
}
// GetTaskEnvDuration returns the duration value of a TASK_ prefixed env var.
// Returns the value and true if set and valid, or 0 and false if not set or invalid.
func GetTaskEnvDuration(key string) (time.Duration, bool) {
v := GetTaskEnv(key)
if v == "" {
return 0, false
}
d, err := time.ParseDuration(v)
return d, err == nil
}
// GetTaskEnvString returns the string value of a TASK_ prefixed env var.
// Returns the value and true if set (non-empty), or empty string and false if not set.
func GetTaskEnvString(key string) (string, bool) {
v := GetTaskEnv(key)
return v, v != ""
}
// GetTaskEnvStringSlice returns a comma-separated list from a TASK_ prefixed env var.
// Returns the slice and true if set (non-empty), or nil and false if not set.
func GetTaskEnvStringSlice(key string) ([]string, bool) {
v := GetTaskEnv(key)
if v == "" {
return nil, false
}
parts := strings.Split(v, ",")
result := make([]string, 0, len(parts))
for _, p := range parts {
if trimmed := strings.TrimSpace(p); trimmed != "" {
result = append(result, trimmed)
}
}
if len(result) == 0 {
return nil, false
}
return result, true
}

View File

@@ -0,0 +1,20 @@
package execext
import (
"runtime"
"strconv"
"github.com/go-task/task/v3/internal/env"
)
var useGoCoreUtils bool
func init() {
// If TASK_CORE_UTILS is set to either true or false, respect that.
// By default, enable on Windows only.
if v, err := strconv.ParseBool(env.GetTaskEnv("CORE_UTILS")); err == nil {
useGoCoreUtils = v
} else {
useGoCoreUtils = runtime.GOOS == "windows"
}
}

View File

@@ -2,42 +2,53 @@ package execext
import (
"context"
"errors"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"mvdan.cc/sh/moreinterp/coreutils"
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/shell"
"mvdan.cc/sh/v3/syntax"
"github.com/go-task/task/v3/errors"
)
// RunCommandOptions is the options for the RunCommand func
// ErrNilOptions is returned when a nil options is given
var ErrNilOptions = errors.New("execext: nil options given")
// RunCommandOptions is the options for the [RunCommand] func.
type RunCommandOptions struct {
Command string
Dir string
Env []string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Command string
Dir string
Env []string
PosixOpts []string
BashOpts []string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
}
var (
// ErrNilOptions is returned when a nil options is given
ErrNilOptions = errors.New("execext: nil options given")
)
// RunCommand runs a shell command
func RunCommand(ctx context.Context, opts *RunCommandOptions) error {
if opts == nil {
return ErrNilOptions
}
p, err := syntax.NewParser().Parse(strings.NewReader(opts.Command), "")
if err != nil {
return err
// Set "-e" or "errexit" by default
opts.PosixOpts = append(opts.PosixOpts, "e")
// Format POSIX options into a slice that mvdan/sh understands
var params []string
for _, opt := range opts.PosixOpts {
if len(opt) == 1 {
params = append(params, fmt.Sprintf("-%s", opt))
} else {
params = append(params, "-o")
params = append(params, opt)
}
}
environ := opts.Env
@@ -46,39 +57,96 @@ func RunCommand(ctx context.Context, opts *RunCommandOptions) error {
}
r, err := interp.New(
interp.Params("-e"),
interp.Dir(opts.Dir),
interp.Params(params...),
interp.Env(expand.ListEnviron(environ...)),
interp.ExecHandlers(execHandlers()...),
interp.OpenHandler(openHandler),
interp.StdIO(opts.Stdin, opts.Stdout, opts.Stderr),
dirOption(opts.Dir),
)
if err != nil {
return err
}
parser := syntax.NewParser()
// Run any shopt commands
if len(opts.BashOpts) > 0 {
shoptCmdStr := fmt.Sprintf("shopt -s %s", strings.Join(opts.BashOpts, " "))
shoptCmd, err := parser.Parse(strings.NewReader(shoptCmdStr), "")
if err != nil {
return err
}
if err := r.Run(ctx, shoptCmd); err != nil {
return err
}
}
// Run the user-defined command
p, err := parser.Parse(strings.NewReader(opts.Command), "")
if err != nil {
return err
}
return r.Run(ctx, p)
}
// IsExitError returns true the given error is an exis status error
func IsExitError(err error) bool {
if _, ok := interp.IsExitStatus(err); ok {
return true
}
return false
func escape(s string) string {
s = filepath.ToSlash(s)
s = strings.ReplaceAll(s, " ", `\ `)
s = strings.ReplaceAll(s, "&", `\&`)
s = strings.ReplaceAll(s, "(", `\(`)
s = strings.ReplaceAll(s, ")", `\)`)
return s
}
// Expand is a helper to mvdan.cc/shell.Fields that returns the first field
// if available.
func Expand(s string) (string, error) {
s = filepath.ToSlash(s)
s = strings.Replace(s, " ", `\ `, -1)
fields, err := shell.Fields(s, nil)
// ExpandLiteral is a wrapper around [expand.Literal]. It will escape the input
// string, expand any shell symbols (such as '~') and resolve any environment
// variables.
func ExpandLiteral(s string) (string, error) {
if s == "" {
return "", nil
}
p := syntax.NewParser()
word, err := p.Document(strings.NewReader(s))
if err != nil {
return "", err
}
if len(fields) > 0 {
return fields[0], nil
cfg := &expand.Config{
Env: expand.FuncEnviron(os.Getenv),
ReadDir2: os.ReadDir,
GlobStar: true,
}
return "", nil
return expand.Literal(cfg, word)
}
// ExpandFields is a wrapper around [expand.Fields]. It will escape the input
// string, expand any shell symbols (such as '~') and resolve any environment
// variables. It also expands brace expressions ({a.b}) and globs (*/**) and
// returns the results as a list of strings.
func ExpandFields(s string) ([]string, error) {
s = escape(s)
p := syntax.NewParser()
var words []*syntax.Word
for w, err := range p.WordsSeq(strings.NewReader(s)) {
if err != nil {
return nil, err
}
words = append(words, w)
}
cfg := &expand.Config{
Env: expand.FuncEnviron(os.Getenv),
ReadDir2: os.ReadDir,
GlobStar: true,
NullGlob: true,
}
return expand.Fields(cfg, words...)
}
func execHandlers() (handlers []func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc) {
if useGoCoreUtils {
handlers = append(handlers, coreutils.ExecHandler)
}
return handlers
}
func openHandler(ctx context.Context, path string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) {
@@ -87,3 +155,24 @@ func openHandler(ctx context.Context, path string, flag int, perm os.FileMode) (
}
return interp.DefaultOpenHandler()(ctx, path, flag, perm)
}
func dirOption(path string) interp.RunnerOption {
return func(r *interp.Runner) error {
err := interp.Dir(path)(r)
if err == nil {
return nil
}
// If the specified directory doesn't exist, it will be created later.
// Therefore, even if `interp.Dir` method returns an error, the
// directory path should be set only when the directory cannot be found.
if absPath, _ := filepath.Abs(path); absPath != "" {
if _, err := os.Stat(absPath); os.IsNotExist(err) {
r.Dir = absPath
return nil
}
}
return err
}
}

View File

@@ -0,0 +1,63 @@
package filepathext
import (
"os"
"path/filepath"
"strings"
)
// SmartJoin joins two paths, but only if the second is not already an
// absolute path.
func SmartJoin(a, b string) string {
if IsAbs(b) {
return b
}
return filepath.Join(a, b)
}
func IsAbs(path string) bool {
// NOTE(@andreynering): If the path contains any if the special
// variables that we know are absolute, return true.
if isSpecialDir(path) {
return true
}
return filepath.IsAbs(path)
}
var knownAbsDirs = []string{
".ROOT_DIR",
".TASKFILE_DIR",
".USER_WORKING_DIR",
}
func isSpecialDir(dir string) bool {
for _, d := range knownAbsDirs {
if strings.Contains(dir, d) {
return true
}
}
return false
}
// TryAbsToRel tries to convert an absolute path to relative based on the
// process working directory. If it can't, it returns the absolute path.
func TryAbsToRel(abs string) string {
wd, err := os.Getwd()
if err != nil {
return abs
}
rel, err := filepath.Rel(wd, abs)
if err != nil {
return abs
}
return rel
}
// IsExtOnly checks whether path points to a file with no name but with
// an extension, i.e. ".yaml"
func IsExtOnly(path string) bool {
return filepath.Base(path) == filepath.Ext(path)
}

View File

@@ -0,0 +1,20 @@
package fingerprint
import (
"context"
"github.com/go-task/task/v3/taskfile/ast"
)
// StatusCheckable defines any type that can check if the status of a task is up-to-date.
type StatusCheckable interface {
IsUpToDate(ctx context.Context, t *ast.Task) (bool, error)
}
// SourcesCheckable defines any type that can check if the sources of a task are up-to-date.
type SourcesCheckable interface {
IsUpToDate(t *ast.Task) (bool, error)
Value(t *ast.Task) (any, error)
OnError(t *ast.Task) error
Kind() string
}

View File

@@ -0,0 +1,320 @@
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package fingerprint
import (
"context"
"github.com/go-task/task/v3/taskfile/ast"
mock "github.com/stretchr/testify/mock"
)
// NewMockStatusCheckable creates a new instance of MockStatusCheckable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockStatusCheckable(t interface {
mock.TestingT
Cleanup(func())
}) *MockStatusCheckable {
mock := &MockStatusCheckable{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockStatusCheckable is an autogenerated mock type for the StatusCheckable type
type MockStatusCheckable struct {
mock.Mock
}
type MockStatusCheckable_Expecter struct {
mock *mock.Mock
}
func (_m *MockStatusCheckable) EXPECT() *MockStatusCheckable_Expecter {
return &MockStatusCheckable_Expecter{mock: &_m.Mock}
}
// IsUpToDate provides a mock function for the type MockStatusCheckable
func (_mock *MockStatusCheckable) IsUpToDate(ctx context.Context, t *ast.Task) (bool, error) {
ret := _mock.Called(ctx, t)
if len(ret) == 0 {
panic("no return value specified for IsUpToDate")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, *ast.Task) (bool, error)); ok {
return returnFunc(ctx, t)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, *ast.Task) bool); ok {
r0 = returnFunc(ctx, t)
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func(context.Context, *ast.Task) error); ok {
r1 = returnFunc(ctx, t)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockStatusCheckable_IsUpToDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsUpToDate'
type MockStatusCheckable_IsUpToDate_Call struct {
*mock.Call
}
// IsUpToDate is a helper method to define mock.On call
// - ctx
// - t
func (_e *MockStatusCheckable_Expecter) IsUpToDate(ctx interface{}, t interface{}) *MockStatusCheckable_IsUpToDate_Call {
return &MockStatusCheckable_IsUpToDate_Call{Call: _e.mock.On("IsUpToDate", ctx, t)}
}
func (_c *MockStatusCheckable_IsUpToDate_Call) Run(run func(ctx context.Context, t *ast.Task)) *MockStatusCheckable_IsUpToDate_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*ast.Task))
})
return _c
}
func (_c *MockStatusCheckable_IsUpToDate_Call) Return(b bool, err error) *MockStatusCheckable_IsUpToDate_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *MockStatusCheckable_IsUpToDate_Call) RunAndReturn(run func(ctx context.Context, t *ast.Task) (bool, error)) *MockStatusCheckable_IsUpToDate_Call {
_c.Call.Return(run)
return _c
}
// NewMockSourcesCheckable creates a new instance of MockSourcesCheckable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockSourcesCheckable(t interface {
mock.TestingT
Cleanup(func())
}) *MockSourcesCheckable {
mock := &MockSourcesCheckable{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// MockSourcesCheckable is an autogenerated mock type for the SourcesCheckable type
type MockSourcesCheckable struct {
mock.Mock
}
type MockSourcesCheckable_Expecter struct {
mock *mock.Mock
}
func (_m *MockSourcesCheckable) EXPECT() *MockSourcesCheckable_Expecter {
return &MockSourcesCheckable_Expecter{mock: &_m.Mock}
}
// IsUpToDate provides a mock function for the type MockSourcesCheckable
func (_mock *MockSourcesCheckable) IsUpToDate(t *ast.Task) (bool, error) {
ret := _mock.Called(t)
if len(ret) == 0 {
panic("no return value specified for IsUpToDate")
}
var r0 bool
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ast.Task) (bool, error)); ok {
return returnFunc(t)
}
if returnFunc, ok := ret.Get(0).(func(*ast.Task) bool); ok {
r0 = returnFunc(t)
} else {
r0 = ret.Get(0).(bool)
}
if returnFunc, ok := ret.Get(1).(func(*ast.Task) error); ok {
r1 = returnFunc(t)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockSourcesCheckable_IsUpToDate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsUpToDate'
type MockSourcesCheckable_IsUpToDate_Call struct {
*mock.Call
}
// IsUpToDate is a helper method to define mock.On call
// - t
func (_e *MockSourcesCheckable_Expecter) IsUpToDate(t interface{}) *MockSourcesCheckable_IsUpToDate_Call {
return &MockSourcesCheckable_IsUpToDate_Call{Call: _e.mock.On("IsUpToDate", t)}
}
func (_c *MockSourcesCheckable_IsUpToDate_Call) Run(run func(t *ast.Task)) *MockSourcesCheckable_IsUpToDate_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*ast.Task))
})
return _c
}
func (_c *MockSourcesCheckable_IsUpToDate_Call) Return(b bool, err error) *MockSourcesCheckable_IsUpToDate_Call {
_c.Call.Return(b, err)
return _c
}
func (_c *MockSourcesCheckable_IsUpToDate_Call) RunAndReturn(run func(t *ast.Task) (bool, error)) *MockSourcesCheckable_IsUpToDate_Call {
_c.Call.Return(run)
return _c
}
// Kind provides a mock function for the type MockSourcesCheckable
func (_mock *MockSourcesCheckable) Kind() string {
ret := _mock.Called()
if len(ret) == 0 {
panic("no return value specified for Kind")
}
var r0 string
if returnFunc, ok := ret.Get(0).(func() string); ok {
r0 = returnFunc()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
// MockSourcesCheckable_Kind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Kind'
type MockSourcesCheckable_Kind_Call struct {
*mock.Call
}
// Kind is a helper method to define mock.On call
func (_e *MockSourcesCheckable_Expecter) Kind() *MockSourcesCheckable_Kind_Call {
return &MockSourcesCheckable_Kind_Call{Call: _e.mock.On("Kind")}
}
func (_c *MockSourcesCheckable_Kind_Call) Run(run func()) *MockSourcesCheckable_Kind_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockSourcesCheckable_Kind_Call) Return(s string) *MockSourcesCheckable_Kind_Call {
_c.Call.Return(s)
return _c
}
func (_c *MockSourcesCheckable_Kind_Call) RunAndReturn(run func() string) *MockSourcesCheckable_Kind_Call {
_c.Call.Return(run)
return _c
}
// OnError provides a mock function for the type MockSourcesCheckable
func (_mock *MockSourcesCheckable) OnError(t *ast.Task) error {
ret := _mock.Called(t)
if len(ret) == 0 {
panic("no return value specified for OnError")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*ast.Task) error); ok {
r0 = returnFunc(t)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockSourcesCheckable_OnError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnError'
type MockSourcesCheckable_OnError_Call struct {
*mock.Call
}
// OnError is a helper method to define mock.On call
// - t
func (_e *MockSourcesCheckable_Expecter) OnError(t interface{}) *MockSourcesCheckable_OnError_Call {
return &MockSourcesCheckable_OnError_Call{Call: _e.mock.On("OnError", t)}
}
func (_c *MockSourcesCheckable_OnError_Call) Run(run func(t *ast.Task)) *MockSourcesCheckable_OnError_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*ast.Task))
})
return _c
}
func (_c *MockSourcesCheckable_OnError_Call) Return(err error) *MockSourcesCheckable_OnError_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockSourcesCheckable_OnError_Call) RunAndReturn(run func(t *ast.Task) error) *MockSourcesCheckable_OnError_Call {
_c.Call.Return(run)
return _c
}
// Value provides a mock function for the type MockSourcesCheckable
func (_mock *MockSourcesCheckable) Value(t *ast.Task) (any, error) {
ret := _mock.Called(t)
if len(ret) == 0 {
panic("no return value specified for Value")
}
var r0 any
var r1 error
if returnFunc, ok := ret.Get(0).(func(*ast.Task) (any, error)); ok {
return returnFunc(t)
}
if returnFunc, ok := ret.Get(0).(func(*ast.Task) any); ok {
r0 = returnFunc(t)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(any)
}
}
if returnFunc, ok := ret.Get(1).(func(*ast.Task) error); ok {
r1 = returnFunc(t)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockSourcesCheckable_Value_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Value'
type MockSourcesCheckable_Value_Call struct {
*mock.Call
}
// Value is a helper method to define mock.On call
// - t
func (_e *MockSourcesCheckable_Expecter) Value(t interface{}) *MockSourcesCheckable_Value_Call {
return &MockSourcesCheckable_Value_Call{Call: _e.mock.On("Value", t)}
}
func (_c *MockSourcesCheckable_Value_Call) Run(run func(t *ast.Task)) *MockSourcesCheckable_Value_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*ast.Task))
})
return _c
}
func (_c *MockSourcesCheckable_Value_Call) Return(v any, err error) *MockSourcesCheckable_Value_Call {
_c.Call.Return(v, err)
return _c
}
func (_c *MockSourcesCheckable_Value_Call) RunAndReturn(run func(t *ast.Task) (any, error)) *MockSourcesCheckable_Value_Call {
_c.Call.Return(run)
return _c
}

View File

@@ -0,0 +1,60 @@
package fingerprint
import (
"os"
"path/filepath"
"sort"
"github.com/go-task/task/v3/internal/execext"
"github.com/go-task/task/v3/internal/filepathext"
"github.com/go-task/task/v3/taskfile/ast"
)
func Globs(dir string, globs []*ast.Glob) ([]string, error) {
resultMap := make(map[string]bool)
for _, g := range globs {
matches, err := glob(dir, g.Glob)
if err != nil {
continue
}
for _, match := range matches {
resultMap[match] = !g.Negate
}
}
return collectKeys(resultMap), nil
}
func glob(dir string, g string) ([]string, error) {
g = filepathext.SmartJoin(dir, g)
fs, err := execext.ExpandFields(g)
if err != nil {
return nil, err
}
results := make(map[string]bool, len(fs))
for _, f := range fs {
info, err := os.Stat(f)
if err != nil {
return nil, err
}
if info.IsDir() {
continue
}
results[f] = true
}
return collectKeys(results), nil
}
func collectKeys(m map[string]bool) []string {
keys := make([]string, 0, len(m))
for k, v := range m {
if v {
// Normalize path separators for consistent sorting across platforms
keys = append(keys, filepath.ToSlash(k))
}
}
sort.Strings(keys)
return keys
}

View File

@@ -0,0 +1,16 @@
package fingerprint
import "fmt"
func NewSourcesChecker(method, tempDir string, dry bool) (SourcesCheckable, error) {
switch method {
case "timestamp":
return NewTimestampChecker(tempDir, dry), nil
case "checksum":
return NewChecksumChecker(tempDir, dry), nil
case "none":
return NoneChecker{}, nil
default:
return nil, fmt.Errorf(`task: invalid method "%s"`, method)
}
}

View File

@@ -0,0 +1,127 @@
package fingerprint
import (
"fmt"
"io"
"os"
"path/filepath"
"regexp"
"strings"
"github.com/zeebo/xxh3"
"github.com/go-task/task/v3/internal/filepathext"
"github.com/go-task/task/v3/taskfile/ast"
)
// ChecksumChecker validates if a task is up to date by calculating its source
// files checksum
type ChecksumChecker struct {
tempDir string
dry bool
}
func NewChecksumChecker(tempDir string, dry bool) *ChecksumChecker {
return &ChecksumChecker{
tempDir: tempDir,
dry: dry,
}
}
func (checker *ChecksumChecker) IsUpToDate(t *ast.Task) (bool, error) {
if len(t.Sources) == 0 {
return false, nil
}
checksumFile := checker.checksumFilePath(t)
data, _ := os.ReadFile(checksumFile)
oldHash := strings.TrimSpace(string(data))
newHash, err := checker.checksum(t)
if err != nil {
return false, nil
}
if !checker.dry && oldHash != newHash {
_ = os.MkdirAll(filepathext.SmartJoin(checker.tempDir, "checksum"), 0o755)
if err = os.WriteFile(checksumFile, []byte(newHash+"\n"), 0o644); err != nil {
return false, err
}
}
if len(t.Generates) > 0 {
// For each specified 'generates' field, check whether the files actually exist
for _, g := range t.Generates {
// Exclusion patterns don't represent output files; skip them.
if g.Negate {
continue
}
generates, err := glob(t.Dir, g.Glob)
if os.IsNotExist(err) {
return false, nil
}
if err != nil {
return false, err
}
if len(generates) == 0 {
return false, nil
}
}
}
return oldHash == newHash, nil
}
func (checker *ChecksumChecker) Value(t *ast.Task) (any, error) {
return checker.checksum(t)
}
func (checker *ChecksumChecker) OnError(t *ast.Task) error {
if len(t.Sources) == 0 {
return nil
}
return os.Remove(checker.checksumFilePath(t))
}
func (*ChecksumChecker) Kind() string {
return "checksum"
}
func (c *ChecksumChecker) checksum(t *ast.Task) (string, error) {
sources, err := Globs(t.Dir, t.Sources)
if err != nil {
return "", err
}
h := xxh3.New()
buf := make([]byte, 128*1024)
for _, f := range sources {
// also sum the filename, so checksum changes for renaming a file
if _, err := io.CopyBuffer(h, strings.NewReader(filepath.Base(f)), buf); err != nil {
return "", err
}
f, err := os.Open(f)
if err != nil {
return "", err
}
if _, err = io.CopyBuffer(h, f, buf); err != nil {
return "", err
}
f.Close()
}
hash := h.Sum128()
return fmt.Sprintf("%x%x", hash.Hi, hash.Lo), nil
}
func (checker *ChecksumChecker) checksumFilePath(t *ast.Task) string {
return filepath.Join(checker.tempDir, "checksum", normalizeFilename(t.Name()))
}
var checksumFilenameRegexp = regexp.MustCompile("[^A-z0-9]")
// replaces invalid characters on filenames with "-"
func normalizeFilename(f string) string {
return checksumFilenameRegexp.ReplaceAllString(f, "-")
}

View File

@@ -1,4 +1,4 @@
package status
package fingerprint
import (
"testing"
@@ -7,6 +7,8 @@ import (
)
func TestNormalizeFilename(t *testing.T) {
t.Parallel()
tests := []struct {
In, Out string
}{
@@ -16,6 +18,6 @@ func TestNormalizeFilename(t *testing.T) {
{"foo1bar2baz3", "foo1bar2baz3"},
}
for _, test := range tests {
assert.Equal(t, test.Out, (&Checksum{}).normalizeFilename(test.In))
assert.Equal(t, test.Out, normalizeFilename(test.In))
}
}

View File

@@ -0,0 +1,23 @@
package fingerprint
import "github.com/go-task/task/v3/taskfile/ast"
// NoneChecker is a no-op Checker.
// It will always report that the task is not up-to-date.
type NoneChecker struct{}
func (NoneChecker) IsUpToDate(t *ast.Task) (bool, error) {
return false, nil
}
func (NoneChecker) Value(t *ast.Task) (any, error) {
return "", nil
}
func (NoneChecker) OnError(t *ast.Task) error {
return nil
}
func (NoneChecker) Kind() string {
return "none"
}

View File

@@ -0,0 +1,173 @@
package fingerprint
import (
"os"
"path/filepath"
"time"
"github.com/go-task/task/v3/taskfile/ast"
)
// TimestampChecker checks if any source change compared with the generated files,
// using file modifications timestamps.
type TimestampChecker struct {
tempDir string
dry bool
}
func NewTimestampChecker(tempDir string, dry bool) *TimestampChecker {
return &TimestampChecker{
tempDir: tempDir,
dry: dry,
}
}
// IsUpToDate implements the Checker interface
func (checker *TimestampChecker) IsUpToDate(t *ast.Task) (bool, error) {
if len(t.Sources) == 0 {
return false, nil
}
sources, err := Globs(t.Dir, t.Sources)
if err != nil {
return false, nil
}
// If generates are declared, ensure they all exist. A missing generated
// file means the task must run regardless of timestamps.
if len(t.Generates) > 0 {
for _, g := range t.Generates {
// Exclusion patterns don't represent output files; skip them.
if g.Negate {
continue
}
files, err := glob(t.Dir, g.Glob)
if os.IsNotExist(err) {
return false, nil
}
if err != nil {
return false, err
}
if len(files) == 0 {
return false, nil
}
}
}
generates, err := Globs(t.Dir, t.Generates)
if err != nil {
return false, nil
}
timestampFile := checker.timestampFilePath(t)
// If the file exists, add the file path to the generates.
// If the generate file is old, the task will be executed.
_, err = os.Stat(timestampFile)
if err == nil {
generates = append(generates, timestampFile)
} else {
// Create the timestamp file for the next execution when the file does not exist.
if !checker.dry {
if err := os.MkdirAll(filepath.Dir(timestampFile), 0o755); err != nil {
return false, err
}
f, err := os.Create(timestampFile)
if err != nil {
return false, err
}
f.Close()
}
}
taskTime := time.Now()
// Compare the time of the generates and sources. If the generates are old, the task will be executed.
// Get the max time of the generates.
generateMaxTime, err := getMaxTime(generates...)
if err != nil || generateMaxTime.IsZero() {
return false, nil
}
// Check if any of the source files is newer than the max time of the generates.
shouldUpdate, err := anyFileNewerThan(sources, generateMaxTime)
if err != nil {
return false, nil
}
// Modify the metadata of the file to the the current time.
if !checker.dry {
if err := os.Chtimes(timestampFile, taskTime, taskTime); err != nil {
return false, err
}
}
return !shouldUpdate, nil
}
func (checker *TimestampChecker) Kind() string {
return "timestamp"
}
// Value implements the Checker Interface
func (checker *TimestampChecker) Value(t *ast.Task) (any, error) {
sources, err := Globs(t.Dir, t.Sources)
if err != nil {
return time.Now(), err
}
sourcesMaxTime, err := getMaxTime(sources...)
if err != nil {
return time.Now(), err
}
if sourcesMaxTime.IsZero() {
return time.Unix(0, 0), nil
}
return sourcesMaxTime, nil
}
func getMaxTime(files ...string) (time.Time, error) {
var t time.Time
for _, f := range files {
info, err := os.Stat(f)
if err != nil {
return time.Time{}, err
}
t = maxTime(t, info.ModTime())
}
return t, nil
}
func maxTime(a, b time.Time) time.Time {
if a.After(b) {
return a
}
return b
}
// If the modification time of any of the files is newer than the the given time, returns true.
// This function is lazy, as it stops when it finds a file newer than the given time.
func anyFileNewerThan(files []string, givenTime time.Time) (bool, error) {
for _, f := range files {
info, err := os.Stat(f)
if err != nil {
return false, err
}
if info.ModTime().After(givenTime) {
return true, nil
}
}
return false, nil
}
// OnError implements the Checker interface
func (*TimestampChecker) OnError(t *ast.Task) error {
return nil
}
func (checker *TimestampChecker) timestampFilePath(t *ast.Task) string {
return filepath.Join(checker.tempDir, "timestamp", normalizeFilename(t.Task))
}

Some files were not shown because too many files have changed in this diff Show More