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:
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user