mirror of
https://github.com/go-task/task.git
synced 2025-01-26 05:27:15 +02:00
a548c63a92
Fixes issue #42 by allowing for template evaluatation on task override variables when the task is launched as dependency.
24 lines
685 B
YAML
24 lines
685 B
YAML
default:
|
|
vars:
|
|
SPANISH: ¡Holla mundo!
|
|
deps:
|
|
- task: write-file
|
|
vars: {CONTENT: Dependence1, FILE: dep1.txt}
|
|
- task: write-file
|
|
vars: {CONTENT: Dependence2, FILE: dep2.txt}
|
|
- task: write-file
|
|
vars: {CONTENT: "{{.SPANISH|replace \"mundo\" \"dependencia\"}}", FILE: spanish-dep.txt}
|
|
cmds:
|
|
- task: write-file
|
|
vars: {CONTENT: Hello, FILE: hello.txt}
|
|
- task: write-file
|
|
vars: {CONTENT: "$echo 'World'", FILE: world.txt}
|
|
- task: write-file
|
|
vars: {CONTENT: "!", FILE: exclamation.txt}
|
|
- task: write-file
|
|
vars: {CONTENT: "{{.SPANISH}}", FILE: spanish.txt}
|
|
|
|
write-file:
|
|
cmds:
|
|
- echo {{.CONTENT}} > {{.FILE}}
|