mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +02:00
display dependend tasks
This commit is contained in:
parent
1c3082ffa6
commit
4b3cea3812
7
task.go
7
task.go
@ -95,6 +95,13 @@ func (e *Executor) printTaskDetails(task string) {
|
||||
Logger := e.Logger
|
||||
displayTaskDetailedDescription(s, Logger)
|
||||
|
||||
e.Logger.Outf("")
|
||||
e.Logger.Outf("dependencies:")
|
||||
|
||||
for _, d := range t.Deps {
|
||||
e.Logger.Outf(" - %s", d.Task)
|
||||
}
|
||||
|
||||
e.Logger.Outf("")
|
||||
e.Logger.Outf("commands:")
|
||||
|
||||
|
10
testdata/details/Taskfile.yml
vendored
10
testdata/details/Taskfile.yml
vendored
@ -1,7 +1,7 @@
|
||||
version: 2
|
||||
tasks:
|
||||
task-with-details:
|
||||
deps: [dependend-task]
|
||||
deps: [dependend-task-1,dependend-task-2]
|
||||
details: |
|
||||
details of task-with-details - line 1
|
||||
line 2
|
||||
@ -16,9 +16,13 @@ tasks:
|
||||
cmds:
|
||||
- echo 'task-without-details was executed'
|
||||
|
||||
dependend-task:
|
||||
dependend-task-1:
|
||||
cmds:
|
||||
- echo 'dependend-task was executed'
|
||||
- echo 'dependend-task-1 was executed'
|
||||
-
|
||||
dependend-task-2:
|
||||
cmds:
|
||||
- echo 'dependend-task-2 was executed'
|
||||
|
||||
other-task-with-details:
|
||||
details: details of other-task-with-details
|
||||
|
@ -4,5 +4,7 @@ First line followed by empty line
|
||||
|
||||
Last Line
|
||||
|
||||
dependencies:
|
||||
|
||||
commands:
|
||||
- exit 0
|
||||
|
4
testdata/details/task-with-details.txt
vendored
4
testdata/details/task-with-details.txt
vendored
@ -4,6 +4,10 @@ details of task-with-details - line 1
|
||||
line 2
|
||||
line 3
|
||||
|
||||
dependencies:
|
||||
- dependend-task-1
|
||||
- dependend-task-2
|
||||
|
||||
commands:
|
||||
- echo 'task-with-details was executed'
|
||||
- echo 'another command'
|
||||
|
Loading…
Reference in New Issue
Block a user