1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

Allow setting global variables through the CLI

Closes #192
This commit is contained in:
Andrey Nering
2019-05-11 11:06:47 -03:00
parent 0233ce52ed
commit f0768b3af1
5 changed files with 55 additions and 31 deletions

View File

@@ -371,6 +371,12 @@ right before.
$ task write-file FILE=file.txt "CONTENT=Hello, World!" print "MESSAGE=All done!"
```
If you want to set global variables using this syntax, give it before any task:
```bash
$ task OUTPUT=file.txt generate-file
```
Example of locally declared vars:
```yaml
@@ -582,7 +588,7 @@ dependencies:
commands:
- your-release-tool
```
If a summary is missing, the description will be printed.
If a summary is missing, the description will be printed.
If the task does not have a summary or a description, a warning is printed.
Please note: *showing the summary will not execute the command*.