Skip to content

Commit

Permalink
CHANGELOG, docs and nits for go-task#321 and go-task#337
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynering committed Jun 14, 2020
1 parent c6d9201 commit 572f6a7
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 24 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion testdata/label_status/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ tasks:
foo:
label: "foobar"
status:
- "false"
- "false"
2 changes: 1 addition & 1 deletion testdata/label_summary/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ tasks:
label: "foobar"
desc: description
status:
- echo "I'm ok"
- echo "I'm ok"
2 changes: 1 addition & 1 deletion testdata/label_uptodate/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ tasks:
foo:
label: "foobar"
status:
- echo "I'm ok"
- echo "I'm ok"
2 changes: 1 addition & 1 deletion testdata/label_var/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ tasks:
foo:
label: "foo{{.BAR}}"
status:
- echo "I'm ok"
- echo "I'm ok"

0 comments on commit 572f6a7

Please sign in to comment.