diff --git a/CHANGELOG.md b/CHANGELOG.md index 398382a691..28cb95e066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## v3.36.0 - 2024-04-08 - Added support for [looping over dependencies](https://taskfile.dev/usage/#looping-over-dependencies) diff --git a/cmd/release/main.go b/cmd/release/main.go index 15a5b6f9fb..d2f959ba82 100644 --- a/cmd/release/main.go +++ b/cmd/release/main.go @@ -15,7 +15,7 @@ import ( const ( changelogSource = "CHANGELOG.md" - changelogTarget = "website/docs/changelog.md" + changelogTarget = "website/docs/changelog.mdx" docsSource = "website/docs" docsTarget = "website/versioned_docs/version-latest" ) diff --git a/package-lock.json b/package-lock.json index 1257281dc2..883a977a33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@go-task/cli", - "version": "3.35.1", + "version": "3.36.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 47fdffcdeb..351a9ef512 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@go-task/cli", - "version": "3.35.1", + "version": "3.36.0", "description": "A task runner / simpler Make alternative written in Go", "scripts": { "postinstall": "go-npm install", diff --git a/website/docs/changelog.mdx b/website/docs/changelog.mdx index eb0e635924..71b4559b0c 100644 --- a/website/docs/changelog.mdx +++ b/website/docs/changelog.mdx @@ -5,6 +5,26 @@ sidebar_position: 14 # Changelog +## v3.36.0 - 2024-04-08 + +- Added support for + [looping over dependencies](https://taskfile.dev/usage/#looping-over-dependencies) + (#1299, #1541 by @pd93). +- When using the + "[Remote Taskfiles](https://taskfile.dev/experiments/remote-taskfiles/)" + experiment, you are now able to use + [remote Taskfiles as your entrypoint](https://taskfile.dev/experiments/remote-taskfiles/#root-remote-taskfiles). + - `includes` in remote Taskfiles will now also resolve correctly (#1347 by + @pd93). +- When using the + "[Any Variables](https://taskfile.dev/experiments/any-variables/)" + experiments, templating is now supported in collection-type variables (#1477, + #1511, #1526 by @pd93). +- Fixed a bug where variables being passed to an included Taskfile were not + available when defining global variables (#1503, #1533 by @pd93). +- Improved support to customized colors by allowing 8-bit colors and multiple + ANSI attributes (#1576 by @pd93). + ## v3.35.1 - 2024-03-04 - Fixed a bug where the `TASKFILE_DIR` variable was sometimes incorrect (#1522, diff --git a/website/versioned_docs/version-latest/api_reference.md b/website/versioned_docs/version-latest/api_reference.mdx similarity index 97% rename from website/versioned_docs/version-latest/api_reference.md rename to website/versioned_docs/version-latest/api_reference.mdx index a53b7cf6d2..2981222683 100644 --- a/website/versioned_docs/version-latest/api_reference.md +++ b/website/versioned_docs/version-latest/api_reference.mdx @@ -130,6 +130,7 @@ There are some special variables that is available on the templating system: | `TASK` | The name of the current task. | | `ROOT_TASKFILE` | The absolute path of the root Taskfile. | | `ROOT_DIR` | The absolute path of the root Taskfile directory. | +| `TASKFILE` | The absolute path of the included Taskfile. | | `TASKFILE_DIR` | The absolute path of the included Taskfile directory. | | `USER_WORKING_DIR` | The absolute path of the directory `task` was called from. | | `CHECKSUM` | The checksum of the files listed in `sources`. Only available within the `status` prop and if method is set to `checksum`. | @@ -153,6 +154,17 @@ Some environment variables can be overridden to adjust Task behavior. | `TASK_COLOR_RED` | `31` | Color used for red. | | `FORCE_COLOR` | | Force color output usage. | +All color variables are [ANSI color codes][ansi]. You can specify multiple codes +separated by a semicolon. For example: `31;1` will make the text bold and red. +Task also supports 8-bit color (256 colors). You can specify these colors by +using the sequence `38;2;R:G:B` for foreground colors and `48;2;R:G:B` for +background colors where `R`, `G` and `B` should be replaced with values between +0 and 255. + +For convenience, we allow foreground colors to be specified using shorthand, +comma-separated syntax: `R,G,B`. For example, `255,0,0` is equivalent to +`38;2;255:0:0`. + ## Taskfile Schema | Attribute | Type | Default | Description | @@ -372,3 +384,7 @@ tasks: | Attribute | Type | Default | Description | | --------- | ---------- | ------- | -------------------------------------------------------------------------------------------------- | | `vars` | `[]string` | | List of variable or environment variable names that must be set if this task is to execute and run | + +{/* prettier-ignore-start */} +[ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/changelog.md b/website/versioned_docs/version-latest/changelog.mdx similarity index 94% rename from website/versioned_docs/version-latest/changelog.md rename to website/versioned_docs/version-latest/changelog.mdx index 33701df714..71b4559b0c 100644 --- a/website/versioned_docs/version-latest/changelog.md +++ b/website/versioned_docs/version-latest/changelog.mdx @@ -5,6 +5,52 @@ sidebar_position: 14 # Changelog +## v3.36.0 - 2024-04-08 + +- Added support for + [looping over dependencies](https://taskfile.dev/usage/#looping-over-dependencies) + (#1299, #1541 by @pd93). +- When using the + "[Remote Taskfiles](https://taskfile.dev/experiments/remote-taskfiles/)" + experiment, you are now able to use + [remote Taskfiles as your entrypoint](https://taskfile.dev/experiments/remote-taskfiles/#root-remote-taskfiles). + - `includes` in remote Taskfiles will now also resolve correctly (#1347 by + @pd93). +- When using the + "[Any Variables](https://taskfile.dev/experiments/any-variables/)" + experiments, templating is now supported in collection-type variables (#1477, + #1511, #1526 by @pd93). +- Fixed a bug where variables being passed to an included Taskfile were not + available when defining global variables (#1503, #1533 by @pd93). +- Improved support to customized colors by allowing 8-bit colors and multiple + ANSI attributes (#1576 by @pd93). + +## v3.35.1 - 2024-03-04 + +- Fixed a bug where the `TASKFILE_DIR` variable was sometimes incorrect (#1522, + #1523 by @pd93). +- Added a new `TASKFILE` special variable that holds the root Taskfile path + (#1523 by @pd93). +- Fixed various issues related to running a Taskfile from a subdirectory (#1529, + #1530 by @pd93). + +## v3.35.0 - 2024-02-28 + +- Added support for + [wildcards in task names](https://taskfile.dev/usage/#wildcard-arguments) + (#836, #1489 by @pd93). +- Added the ability to + [run Taskfiles via stdin](https://taskfile.dev/usage/#reading-a-taskfile-from-stdin) + (#655, #1483 by @pd93). +- Bumped minimum Go version to 1.21 (#1500 by @pd93). +- Fixed bug related to the `--list` flag (#1509, #1512 by @pd93, #1514, #1520 by + @pd93). +- Add mention on the documentation to the fact that the variable declaration + order is respected (#1510 by @kirkrodrigues). +- Improved style guide docs (#1495 by @iwittkau). +- Removed duplicated entry for `requires` on the API docs (#1491 by + @teatimeguest). + ## v3.34.1 - 2024-01-27 - Fixed prompt regression on diff --git a/website/versioned_docs/version-latest/community.md b/website/versioned_docs/version-latest/community.mdx similarity index 100% rename from website/versioned_docs/version-latest/community.md rename to website/versioned_docs/version-latest/community.mdx diff --git a/website/versioned_docs/version-latest/contributing.md b/website/versioned_docs/version-latest/contributing.mdx similarity index 88% rename from website/versioned_docs/version-latest/contributing.md rename to website/versioned_docs/version-latest/contributing.mdx index dbe15e6cda..8a86d37638 100644 --- a/website/versioned_docs/version-latest/contributing.md +++ b/website/versioned_docs/version-latest/contributing.mdx @@ -72,21 +72,21 @@ install the extension. Task uses [Docusaurus][docusaurus] to host a documentation server. The code for this is located in the core Task repository. This can be setup and run locally -by using `task docs` (requires `nodejs` & `yarn`). All content is written in -Markdown and is located in the `docs/docs` directory. All Markdown documents +by using `task website` (requires `nodejs` & `yarn`). All content is written in +Markdown and is located in the `website/docs` directory. All Markdown documents should have an 80 character line wrap limit (enforced by Prettier). -When making a change, consider whether a change to the [Usage -Guide](/usage) is necessary. This document contains descriptions and -examples of how to use Task features. If you're adding a new feature, try to -find an appropriate place to add a new section. If you're updating an existing -feature, ensure that the documentation and any examples are up-to-date. Ensure -that any examples follow the [Taskfile Styleguide](/styleguide). +When making a change, consider whether a change to the [Usage Guide](/usage) is +necessary. This document contains descriptions and examples of how to use Task +features. If you're adding a new feature, try to find an appropriate place to +add a new section. If you're updating an existing feature, ensure that the +documentation and any examples are up-to-date. Ensure that any examples follow +the [Taskfile Styleguide](/styleguide). If you added a new field, command or flag, ensure that you add it to the -[API Reference](/api). New fields also need to be added to the -[JSON Schema][json-schema]. The descriptions for fields in the API reference and -the schema should match. +[API Reference](/api). New fields also need to be added to the [JSON +Schema][json-schema]. The descriptions for fields in the API reference and the +schema should match. ### Writing tests @@ -147,7 +147,7 @@ If you have questions, feel free to ask them in the `#help` forum channel on our --- - +{/* prettier-ignore-start */} [task]: https://github.com/go-task/task [vscode-task]: https://github.com/go-task/vscode-task [go]: https://go.dev @@ -157,11 +157,11 @@ If you have questions, feel free to ask them in the `#help` forum channel on our [nodejs]: https://nodejs.org/en/ [yarn]: https://yarnpkg.com/ [docusaurus]: https://docusaurus.io -[json-schema]: https://github.com/go-task/task/blob/main/docs/static/schema.json +[json-schema]: https://github.com/go-task/task/blob/main/website/static/schema.json [task-open-issues]: https://github.com/go-task/task/issues [vscode-task-open-issues]: https://github.com/go-task/vscode-task/issues [good-first-issue]: https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 [discord-server]: https://discord.gg/6TY36E39UK [discussion]: https://github.com/go-task/task/discussions [conventional-commits]: https://www.conventionalcommits.org - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/deprecations/deprecations.md b/website/versioned_docs/version-latest/deprecations/deprecations.mdx similarity index 100% rename from website/versioned_docs/version-latest/deprecations/deprecations.md rename to website/versioned_docs/version-latest/deprecations/deprecations.mdx diff --git a/website/versioned_docs/version-latest/deprecations/template.md b/website/versioned_docs/version-latest/deprecations/template.mdx similarity index 100% rename from website/versioned_docs/version-latest/deprecations/template.md rename to website/versioned_docs/version-latest/deprecations/template.mdx diff --git a/website/versioned_docs/version-latest/deprecations/version_2_schema.md b/website/versioned_docs/version-latest/deprecations/version_2_schema.mdx similarity index 95% rename from website/versioned_docs/version-latest/deprecations/version_2_schema.md rename to website/versioned_docs/version-latest/deprecations/version_2_schema.mdx index 7ed1b85d6a..1011e5c971 100644 --- a/website/versioned_docs/version-latest/deprecations/version_2_schema.md +++ b/website/versioned_docs/version-latest/deprecations/version_2_schema.mdx @@ -26,8 +26,8 @@ main branch. To use a more recent version of Task, you will need to ensure that your Taskfile uses the version 3 schema instead. A list of changes between version 2 and version 3 are available in the [Task v3 Release Notes][v3.0.0]. - +{/* prettier-ignore-start */} [v3.0.0]: https://github.com/go-task/task/releases/tag/v3.0.0 [v3.33.0]: https://github.com/go-task/task/releases/tag/v3.33.0 [deprecation-notice]: https://github.com/go-task/task/issues/1197 - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/donate.md b/website/versioned_docs/version-latest/donate.md deleted file mode 100644 index 108a92506f..0000000000 --- a/website/versioned_docs/version-latest/donate.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -slug: /donate/ -sidebar_position: 16 ---- - -# 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. - -Companies who donate at least $50/month will be featured as a "Gold Sponsor" in -the website homepage and on the GitHub repository README. Make contact with -[@andreynering] with the logo you want to be shown. Suspect businesses -(gambling, casinos, etc) won't be allowed, though. - -## GitHub Sponsors - -The preferred way to donate to the maintainers is via GitHub Sponsors. Just use -the following links to do your donation. We suggest a 50/50 split to each -maintainer of the total amount you plan to donate to the project. - -- [@andreynering](https://github.com/sponsors/andreynering) -- [@pd93](https://github.com/sponsors/pd93) - -## Open Collective - -If you prefer [Open Collective](https://opencollective.com/task) you can donate -by using these links: - -- [$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) -- [$50 per month](https://opencollective.com/task/contribute/sponsor-28775/checkout) -- [Custom value - One-time donation option supported](https://opencollective.com/task/donate) - -## PayPal - -You can donate to [@andreynering] via PayPal as well: - -- [Any value - One-time donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=GSVDU63RKG45A¤cy_code=USD&source=url) - -## PIX (Brazil only) - -And if you're Brazilian, you can also donate to [@andreynering] via PIX by -[using this QR Code](/img/pix.png). - - -[@andreynering]: https://github.com/andreynering - diff --git a/website/versioned_docs/version-latest/experiments/any_variables.mdx b/website/versioned_docs/version-latest/experiments/any_variables.mdx index bb292e8628..be768d10df 100644 --- a/website/versioned_docs/version-latest/experiments/any_variables.mdx +++ b/website/versioned_docs/version-latest/experiments/any_variables.mdx @@ -340,7 +340,7 @@ When looping over a map we also make an additional `{{.KEY}}` variable availabe that holds the string value of the map key. Remember that maps are unordered, so the order in which the items are looped over is random. - +{/* prettier-ignore-start */} [enabling-experiments]: /experiments/#enabling-experiments [slim-sprig]: https://go-task.github.io/slim-sprig/ - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/experiments/experiments.md b/website/versioned_docs/version-latest/experiments/experiments.mdx similarity index 100% rename from website/versioned_docs/version-latest/experiments/experiments.md rename to website/versioned_docs/version-latest/experiments/experiments.mdx diff --git a/website/versioned_docs/version-latest/experiments/gentle_force.md b/website/versioned_docs/version-latest/experiments/gentle_force.mdx similarity index 84% rename from website/versioned_docs/version-latest/experiments/gentle_force.md rename to website/versioned_docs/version-latest/experiments/gentle_force.mdx index d468770c65..ab3d52d3b2 100644 --- a/website/versioned_docs/version-latest/experiments/gentle_force.md +++ b/website/versioned_docs/version-latest/experiments/gentle_force.mdx @@ -22,9 +22,9 @@ This experiment breaks the following functionality: :::info -To enable this experiment, set the environment variable: `TASK_X_FORCE=1`. Check -out [our guide to enabling experiments ][enabling-experiments] for more -information. +To enable this experiment, set the environment variable: +`TASK_X_GENTLE_FORCE=1`. Check out [our guide to enabling experiments +][enabling-experiments] for more information. ::: @@ -44,6 +44,6 @@ should replace all uses of the `--force` flag with `--force-all`. Alternatively, if you want to adopt the new behavior, you can continue to use the `--force` flag as you do now! - +{/* prettier-ignore-start */} [enabling-experiments]: /experiments/#enabling-experiments - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/experiments/remote_taskfiles.md b/website/versioned_docs/version-latest/experiments/remote_taskfiles.mdx similarity index 87% rename from website/versioned_docs/version-latest/experiments/remote_taskfiles.md rename to website/versioned_docs/version-latest/experiments/remote_taskfiles.mdx index 852be8e5ea..742b451c67 100644 --- a/website/versioned_docs/version-latest/experiments/remote_taskfiles.md +++ b/website/versioned_docs/version-latest/experiments/remote_taskfiles.mdx @@ -48,16 +48,6 @@ tasks: and you run `task my-remote-namespace:hello`, it will print the text: "Hello from the remote Taskfile!" to your console. -## Root remote Taskfiles - -You can also specify a remote Taskfile as the entrypoint for Task by using the -`--taskfile` flag. This means you don't need to have any Taskfile defined -locally at all. For example: - -```shell -task --taskfile https://taskfile.dev hello -``` - ## Security Running commands from sources that you do not control is always a potential @@ -90,10 +80,9 @@ flag. Before enabling this flag, you should: Task currently supports both `http` and `https` URLs. However, the `http` requests will not execute by default unless you run the task with the `--insecure` flag. This is to protect you from accidentally running a remote -Taskfile that is hosted on and unencrypted connection. Sources that are not -protected by TLS are vulnerable to [man-in-the-middle -attacks][man-in-the-middle-attacks] and should be avoided unless you know what -you are doing. +Taskfile that is via an unencrypted connection. Sources that are not protected +by TLS are vulnerable to [man-in-the-middle attacks][man-in-the-middle-attacks] +and should be avoided unless you know what you are doing. ## Caching & Running Offline @@ -109,7 +98,7 @@ and look for a cached copy instead. This timeout can be configured by setting the `--timeout` flag and specifying a duration. For example, `--timeout 5s` will set the timeout to 5 seconds. - +{/* prettier-ignore-start */} [enabling-experiments]: /experiments/#enabling-experiments [man-in-the-middle-attacks]: https://en.wikipedia.org/wiki/Man-in-the-middle_attack - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/experiments/template.md b/website/versioned_docs/version-latest/experiments/template.mdx similarity index 94% rename from website/versioned_docs/version-latest/experiments/template.md rename to website/versioned_docs/version-latest/experiments/template.mdx index 37ac99877c..fca9a527c2 100644 --- a/website/versioned_docs/version-latest/experiments/template.md +++ b/website/versioned_docs/version-latest/experiments/template.mdx @@ -37,6 +37,6 @@ information. \{Short explanation of how users should migrate to the new behavior\} - +{/* prettier-ignore-start */} [enabling-experiments]: /experiments/#enabling-experiments - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/faq.md b/website/versioned_docs/version-latest/faq.mdx similarity index 97% rename from website/versioned_docs/version-latest/faq.md rename to website/versioned_docs/version-latest/faq.mdx index 6a8a96e6b7..4eb8403436 100644 --- a/website/versioned_docs/version-latest/faq.md +++ b/website/versioned_docs/version-latest/faq.mdx @@ -95,7 +95,7 @@ this work. Constructive comments and contributions are very welcome! - [mvdan/sh#93](https://github.com/mvdan/sh/issues/93) - [mvdan/sh#97](https://github.com/mvdan/sh/issues/97) - +{/* prettier-ignore-start */} [git-bash]: https://gitforwindows.org/ [wsl]: https://learn.microsoft.com/en-us/windows/wsl/install - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/installation.md b/website/versioned_docs/version-latest/installation.mdx similarity index 96% rename from website/versioned_docs/version-latest/installation.md rename to website/versioned_docs/version-latest/installation.mdx index c9fc489e7c..ac5e063df0 100644 --- a/website/versioned_docs/version-latest/installation.md +++ b/website/versioned_docs/version-latest/installation.mdx @@ -29,23 +29,23 @@ so you also have that option if you prefer: brew install go-task ``` -### Tea +### pkgx -If you're on macOS or Linux and have [tea][tea] installed, getting Task is as +If you're on macOS or Linux and have [pkgx](https://pkgx.sh/) installed, getting Task is as simple as running: ```shell -tea task +pkgx task ``` -or, if you have tea’s magic enabled: +or, if you have pkgx integration enabled: ```shell task ``` This installation method is community owned. After a new release of Task, they -are automatically released by tea in a minimum of time. +are automatically released by pkgx in a minimum of time. ### Snap @@ -290,7 +290,7 @@ Add the line and save the file: Invoke-Expression -Command path/to/task.ps1 ``` - +{/* prettier-ignore-start */} [go]: https://golang.org/ [snapcraft]: https://snapcraft.io/task [homebrew]: https://brew.sh/ @@ -300,4 +300,4 @@ Invoke-Expression -Command path/to/task.ps1 [choco]: https://chocolatey.org/ [scoop]: https://scoop.sh/ [tea]: https://tea.xyz/ - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/integrations.md b/website/versioned_docs/version-latest/integrations.mdx similarity index 97% rename from website/versioned_docs/version-latest/integrations.md rename to website/versioned_docs/version-latest/integrations.mdx index 2e15da29d7..3f2364c80e 100644 --- a/website/versioned_docs/version-latest/integrations.md +++ b/website/versioned_docs/version-latest/integrations.mdx @@ -32,7 +32,7 @@ To get autocompletion and validation for your Taskfile, see the This was initially created by @KROSF in [this Gist](https://gist.github.com/KROSF/c5435acf590acd632f71bb720f685895) and is now officially maintained in -[this file](https://github.com/go-task/task/blob/main/docs/static/schema.json) +[this file](https://github.com/go-task/task/blob/main/website/static/schema.json) and made available at https://taskfile.dev/schema.json. This schema can be used to validate Taskfiles and provide autocompletion in many code editors: diff --git a/website/versioned_docs/version-latest/intro.md b/website/versioned_docs/version-latest/intro.mdx similarity index 92% rename from website/versioned_docs/version-latest/intro.md rename to website/versioned_docs/version-latest/intro.mdx index 72151db0c0..8996ab3a48 100644 --- a/website/versioned_docs/version-latest/intro.md +++ b/website/versioned_docs/version-latest/intro.mdx @@ -2,13 +2,13 @@ slug: / sidebar_position: 1 title: Home +hide_title: true --- -# Task -
- +
+
Task is a task runner / build tool that aims to be simpler and easier to use than, for example, [GNU Make][make]. @@ -50,7 +50,7 @@ guide to check the full schema documentation and Task features. of files haven't changed since last run (based either on its timestamp or content). - +{/* prettier-ignore-start */} [make]: https://www.gnu.org/software/make/ [go]: https://go.dev/ [yaml]: http://yaml.org/ @@ -58,4 +58,4 @@ guide to check the full schema documentation and Task features. [snapcraft]: https://snapcraft.io/ [scoop]: https://scoop.sh/ [sh]: https://github.com/mvdan/sh - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/releasing.md b/website/versioned_docs/version-latest/releasing.mdx similarity index 97% rename from website/versioned_docs/version-latest/releasing.md rename to website/versioned_docs/version-latest/releasing.mdx index 0db6ef8b5c..b22143521f 100644 --- a/website/versioned_docs/version-latest/releasing.md +++ b/website/versioned_docs/version-latest/releasing.mdx @@ -61,7 +61,7 @@ take care of updating versions there by editing [this file](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/tools/go-task/default.nix). If you think its Task version is outdated, open an issue to let us know. - +{/* prettier-ignore-start */} [goreleaser]: https://goreleaser.com/ [homebrewtap]: https://github.com/go-task/homebrew-tap [gotaskrb]: https://github.com/go-task/homebrew-tap/blob/main/Formula/go-task.rb @@ -69,4 +69,4 @@ If you think its Task version is outdated, open an issue to let us know. [snappackage]: https://github.com/go-task/snap [snapcraftyaml]: https://github.com/go-task/snap/blob/main/snap/snapcraft.yaml#L2 [snapcraftdashboard]: https://snapcraft.io/task/releases - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/styleguide.md b/website/versioned_docs/version-latest/styleguide.mdx similarity index 100% rename from website/versioned_docs/version-latest/styleguide.md rename to website/versioned_docs/version-latest/styleguide.mdx diff --git a/website/versioned_docs/version-latest/taskfile_versions.md b/website/versioned_docs/version-latest/taskfile_versions.mdx similarity index 98% rename from website/versioned_docs/version-latest/taskfile_versions.md rename to website/versioned_docs/version-latest/taskfile_versions.mdx index 989e17c278..0b08072645 100644 --- a/website/versioned_docs/version-latest/taskfile_versions.md +++ b/website/versioned_docs/version-latest/taskfile_versions.mdx @@ -255,9 +255,9 @@ The variable priority order was also different: 3. Task variables 4. `Taskvars.yml` variables - +{/* prettier-ignore-start */} [deprecate-version-2-schema]: /deprecations/version-2-schema/ [output]: /usage#output-syntax [ignore_errors]: /usage#ignore-errors [includes]: /usage#including-other-taskfiles - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/translate.md b/website/versioned_docs/version-latest/translate.mdx similarity index 92% rename from website/versioned_docs/version-latest/translate.md rename to website/versioned_docs/version-latest/translate.mdx index 47f39b35a3..d45961d725 100644 --- a/website/versioned_docs/version-latest/translate.md +++ b/website/versioned_docs/version-latest/translate.mdx @@ -16,7 +16,7 @@ translations, please ask for access on the [#translations channel on our Discord server][discord]. If a given language is not being shown to Crowdin yet, just ask and we can configure it. - +{/* prettier-ignore-start */} [crowdin]: https://crowdin.com/project/taskfile [discord]: https://discord.gg/6TY36E39UK - +{/* prettier-ignore-end */} diff --git a/website/versioned_docs/version-latest/usage.md b/website/versioned_docs/version-latest/usage.mdx similarity index 98% rename from website/versioned_docs/version-latest/usage.md rename to website/versioned_docs/version-latest/usage.mdx index 7d1f1d73fe..cea5a9507e 100644 --- a/website/versioned_docs/version-latest/usage.md +++ b/website/versioned_docs/version-latest/usage.mdx @@ -1197,6 +1197,43 @@ tasks: - echo 'bar' ``` +### Looping over dependencies + +All of the above looping techniques can also be applied to the `deps` property. +This allows you to combine loops with concurrency: + +```yaml +version: '3' + +tasks: + default: + deps: + - for: [foo, bar] + task: my-task + vars: + FILE: '{{.ITEM}}' + + my-task: + cmds: + - echo '{{.FILE}}' +``` + +It is important to note that as `deps` are run in parallel, the order in which +the iterations are run is not guaranteed and the output may vary. For example, +the output of the above example may be either: + +```shell +foo +bar +``` + +or + +```shell +bar +foo +``` + ## Forwarding CLI arguments to commands If `--` is given in the CLI, all following parameters are added to a special @@ -1917,6 +1954,6 @@ if called by another task, either directly or as a dependency. ::: - +{/* prettier-ignore-start */} [gotemplate]: https://golang.org/pkg/text/template/ - +{/* prettier-ignore-end */}