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:
parent
1c3082ffa6
commit
4b3cea3812
7
task.go
7
task.go
@ -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:")
|
||||||
|
|
||||||
|
10
testdata/details/Taskfile.yml
vendored
10
testdata/details/Taskfile.yml
vendored
@ -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
|
||||||
|
@ -4,5 +4,7 @@ First line followed by empty line
|
|||||||
|
|
||||||
Last Line
|
Last Line
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- exit 0
|
- 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 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'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user