File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 27
27
experiments (similar to ` .env ` ) (#1982 by @vmaerten ).
28
28
- Added new [ Getting Started docs] ( https://taskfile.dev/getting-started ) (#2086
29
29
by @pd93 ).
30
+ - Allow ` matrix ` to use references to other variables (#2065 , #2069 by @pd93 ).
30
31
31
32
#### Package API
32
33
Original file line number Diff line number Diff line change @@ -1412,6 +1412,27 @@ darwin/amd64
1412
1412
darwin/arm64
1413
1413
` ` `
1414
1414
1415
+ You can also use references to other variables as long as they are also lists :
1416
+
1417
+ ` ` ` yaml
1418
+ version: "3"
1419
+
1420
+ vars:
1421
+ OS_VAR: ["windows", "linux", "darwin"]
1422
+ ARCH_VAR: ["amd64", "arm64"]
1423
+
1424
+ tasks:
1425
+ default:
1426
+ cmds:
1427
+ - for:
1428
+ matrix:
1429
+ OS:
1430
+ ref: .OS_VAR
1431
+ ARCH:
1432
+ ref: .ARCH_VAR
1433
+ cmd: echo "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
1434
+ ` ` `
1435
+
1415
1436
# ## Looping over your task's sources
1416
1437
1417
1438
You are also able to loop over the sources of your task :
You can’t perform that action at this time.
0 commit comments