mirror of
https://github.com/go-task/task.git
synced 2024-12-04 10:24:45 +02:00
parent
c6d9201680
commit
572f6a7fab
@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
# v3.0.0 - Unreleased
|
||||
|
||||
- Add `label:` to task so you can override the task name in the logs
|
||||
([#321](https://github.com/go-task/task/issues/321]), [#337](https://github.com/go-task/task/pull/337)).
|
||||
|
||||
# v3.0.0 - Preview 4
|
||||
|
||||
- Refactor how variables work on version 3
|
||||
|
@ -687,6 +687,30 @@ 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*.
|
||||
|
||||
## Overriding task name
|
||||
|
||||
Sometimes you may want to override the task name print on summary, up-to-date
|
||||
messates to STDOUT, etc. In this case you can just set `label:`, which can also
|
||||
be interpolated with variables:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
- task: print
|
||||
vars:
|
||||
MESSAGE: hello
|
||||
- task: print
|
||||
vars:
|
||||
MESSAGE: world
|
||||
|
||||
print:
|
||||
label: 'print-{{.MESSAGE}}'
|
||||
cmds:
|
||||
- echo "{{.MESSAGE}}"
|
||||
```
|
||||
|
||||
## Silent mode
|
||||
|
||||
Silent mode disables echoing of commands before Task runs it.
|
||||
|
2
testdata/label_status/Taskfile.yml
vendored
2
testdata/label_status/Taskfile.yml
vendored
@ -4,4 +4,4 @@ tasks:
|
||||
foo:
|
||||
label: "foobar"
|
||||
status:
|
||||
- "false"
|
||||
- "false"
|
||||
|
2
testdata/label_summary/Taskfile.yml
vendored
2
testdata/label_summary/Taskfile.yml
vendored
@ -5,4 +5,4 @@ tasks:
|
||||
label: "foobar"
|
||||
desc: description
|
||||
status:
|
||||
- echo "I'm ok"
|
||||
- echo "I'm ok"
|
||||
|
2
testdata/label_uptodate/Taskfile.yml
vendored
2
testdata/label_uptodate/Taskfile.yml
vendored
@ -4,4 +4,4 @@ tasks:
|
||||
foo:
|
||||
label: "foobar"
|
||||
status:
|
||||
- echo "I'm ok"
|
||||
- echo "I'm ok"
|
||||
|
2
testdata/label_var/Taskfile.yml
vendored
2
testdata/label_var/Taskfile.yml
vendored
@ -7,4 +7,4 @@ tasks:
|
||||
foo:
|
||||
label: "foo{{.BAR}}"
|
||||
status:
|
||||
- echo "I'm ok"
|
||||
- echo "I'm ok"
|
||||
|
Loading…
Reference in New Issue
Block a user