-
-
Notifications
You must be signed in to change notification settings - Fork 763
Labels
area: formattingChanges related to output and formatting.Changes related to output and formatting.
Description
Description
I want taskfile to automatically show the vars and requires when calling taskfile --summary <task>, so that I do not have to manually document them.
Given the following:
> cat Taskfile.yaml
version: 3
tasks:
mytask:
desc: It does things
summary: |
It does things and has optional and required variables.
vars:
OPTIONAL_VAR: "hello"
requires:
vars:
- REQUIRED_VAR
cmds:
- cmd: echo {{ .OPTIONAL_VAR }} {{ .REQUIRED_VAR }}Current behaviour
> task --summary mytask
task: infrastructure:mytask
It does things and has optional and required variables.
commands:
- echo helloDesired behaviour
task: infrastructure:mytask
It does things and has optional and required variables.
vars:
OPTIONAL_VAR: "hello"
requires:
vars:
- REQUIRED_VAR
commands:
- echo helloMetadata
Metadata
Assignees
Labels
area: formattingChanges related to output and formatting.Changes related to output and formatting.