mirror of
https://github.com/go-task/task.git
synced 2025-06-23 00:38:19 +02:00
feat: loop over a matrix (#1767)
This commit is contained in:
8
testdata/for/cmds/Taskfile.yml
vendored
8
testdata/for/cmds/Taskfile.yml
vendored
@ -7,6 +7,14 @@ tasks:
|
||||
- for: ["a", "b", "c"]
|
||||
cmd: echo "{{.ITEM}}"
|
||||
|
||||
loop-matrix:
|
||||
cmds:
|
||||
- for:
|
||||
matrix:
|
||||
OS: ["windows", "linux", "darwin"]
|
||||
ARCH: ["amd64", "arm64"]
|
||||
cmd: echo "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
|
||||
|
||||
# Loop over the task's sources
|
||||
loop-sources:
|
||||
sources:
|
||||
|
10
testdata/for/deps/Taskfile.yml
vendored
10
testdata/for/deps/Taskfile.yml
vendored
@ -9,6 +9,16 @@ tasks:
|
||||
vars:
|
||||
TEXT: "{{.ITEM}}"
|
||||
|
||||
loop-matrix:
|
||||
deps:
|
||||
- for:
|
||||
matrix:
|
||||
OS: ["windows", "linux", "darwin"]
|
||||
ARCH: ["amd64", "arm64"]
|
||||
task: echo
|
||||
vars:
|
||||
TEXT: "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
|
||||
|
||||
# Loop over the task's sources
|
||||
loop-sources:
|
||||
sources:
|
||||
|
Reference in New Issue
Block a user