Skip to content

Commit 7652d78

Browse files
committed
Some documentation improvements after the release of v3
Thanks @marco-m
1 parent dd2116c commit 7652d78

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

docs/usage.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,9 @@ When doing interpolation of variables, Task will look for the below.
472472
They are listed below in order of importance (e.g. most important first):
473473

474474
- Variables declared in the task definition
475-
- Variables given while calling a task from another.
475+
- Variables given while calling a task from another
476476
(See [Calling another task](#calling-another-task) above)
477-
- Variables declared in the `vars:` option in the `Taskfile`
478-
- Variables available in the `Taskvars.yml` file
477+
- Global variables (those declared in the `vars:` option in the Taskfile)
479478
- Environment variables
480479

481480
Example of sending parameters with environment variables:
@@ -489,6 +488,7 @@ $ TASK_VARIABLE=a-value task do-something
489488
Since some shells don't support above syntax to set environment variables
490489
(Windows) tasks also accepts a similar style when not in the beginning of
491490
the command.
491+
492492
```bash
493493
$ task write-file FILE=file.txt "CONTENT=Hello, World!" print "MESSAGE=All done!"
494494
```
@@ -528,30 +528,6 @@ DEV_MODE: production
528528
GIT_COMMIT: {sh: git log -n 1 --format=%h}
529529
```
530530

531-
### Variables expansion
532-
533-
Variables are expanded 2 times by default. You can change that by setting the
534-
`expansions:` option. Change that will be necessary if you compose many
535-
variables together:
536-
537-
```yaml
538-
version: '3'
539-
540-
expansions: 3
541-
542-
vars:
543-
FOO: foo
544-
BAR: bar
545-
BAZ: baz
546-
FOOBAR: "{{.FOO}}{{.BAR}}"
547-
FOOBARBAZ: "{{.FOOBAR}}{{.BAZ}}"
548-
549-
tasks:
550-
default:
551-
cmds:
552-
- echo "{{.FOOBARBAZ}}"
553-
```
554-
555531
### Dynamic variables
556532

557533
The below syntax (`sh:` prop in a variable) is considered a dynamic variable.

0 commit comments

Comments
 (0)