1
0
mirror of https://github.com/go-task/task.git synced 2025-07-15 01:35:00 +02:00

chore: changelog for #2069

This commit is contained in:
Pete Davison
2025-02-23 18:18:22 +00:00
parent d6234af49a
commit cdaf69e03d
2 changed files with 22 additions and 0 deletions

View File

@ -27,6 +27,7 @@
experiments (similar to `.env`) (#1982 by @vmaerten).
- Added new [Getting Started docs](https://taskfile.dev/getting-started) (#2086
by @pd93).
- Allow `matrix` to use references to other variables (#2065, #2069 by @pd93).
#### Package API

View File

@ -1412,6 +1412,27 @@ darwin/amd64
darwin/arm64
```
You can also use references to other variables as long as they are also lists:
```yaml
version: "3"
vars:
OS_VAR: ["windows", "linux", "darwin"]
ARCH_VAR: ["amd64", "arm64"]
tasks:
default:
cmds:
- for:
matrix:
OS:
ref: .OS_VAR
ARCH:
ref: .ARCH_VAR
cmd: echo "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
```
### Looping over your task's sources
You are also able to loop over the sources of your task: