1
0
mirror of https://github.com/go-task/task.git synced 2025-08-08 22:36:57 +02:00

Fix Taskvar file documentation

This commit is contained in:
Andrey Nering
2017-03-05 17:10:20 -03:00
parent 41df7e19b4
commit 17c3a67be6

View File

@@ -61,12 +61,12 @@ setvar:
The above sample saves the path into a new variable which is then again echoed.
You can use environment variables, task level variables and a file called
`Variables` as source of variables.
`Taskvars.yml` (or `Taskvars.toml` or `Taskvars.json`) as source of variables.
They are evaluated in the following order:
Task local variables are overwritten by variables found in `Variables`.
Variables found in `Variables` are overwritten with variables from the
Task local variables are overwritten by variables found in `Taskvars` file.
Variables found in `Taskvars` file are overwritten with variables from the
environment. The output of the last command is stored in the environment. So
you can do something like this:
@@ -118,7 +118,6 @@ printos:
- echo '{{OS}} {{ARCH}}'
- "echo '{{if eq OS \"windows\"}}windows-command{{else}}unix-command{{end}}'"
- echo 'Is SH? {{IsSH}}'
```
### Running task in another dir