1
0
mirror of https://github.com/go-task/task.git synced 2025-04-15 11:56:34 +02:00

display dependend tasks

This commit is contained in:
jaedle 2019-02-24 14:53:39 +01:00
parent 1c3082ffa6
commit 4b3cea3812
4 changed files with 20 additions and 3 deletions

View File

@ -95,6 +95,13 @@ func (e *Executor) printTaskDetails(task string) {
Logger := e.Logger Logger := e.Logger
displayTaskDetailedDescription(s, 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("")
e.Logger.Outf("commands:") e.Logger.Outf("commands:")

View File

@ -1,7 +1,7 @@
version: 2 version: 2
tasks: tasks:
task-with-details: task-with-details:
deps: [dependend-task] deps: [dependend-task-1,dependend-task-2]
details: | details: |
details of task-with-details - line 1 details of task-with-details - line 1
line 2 line 2
@ -16,9 +16,13 @@ tasks:
cmds: cmds:
- echo 'task-without-details was executed' - echo 'task-without-details was executed'
dependend-task: dependend-task-1:
cmds: 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: other-task-with-details:
details: details of other-task-with-details details: details of other-task-with-details

View File

@ -4,5 +4,7 @@ First line followed by empty line
Last Line Last Line
dependencies:
commands: commands:
- exit 0 - exit 0

View File

@ -4,6 +4,10 @@ details of task-with-details - line 1
line 2 line 2
line 3 line 3
dependencies:
- dependend-task-1
- dependend-task-2
commands: commands:
- echo 'task-with-details was executed' - echo 'task-with-details was executed'
- echo 'another command' - echo 'another command'