1
0
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:
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
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:")

View File

@ -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

View File

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

View File

@ -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'