mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
refactoring
This commit is contained in:
@@ -7,6 +7,16 @@ import (
|
|||||||
"github.com/go-task/task/v2/internal/taskfile"
|
"github.com/go-task/task/v2/internal/taskfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func PrintAll(l *logger.Logger, t *taskfile.Taskfile, c []taskfile.Call) {
|
||||||
|
for i, call := range c {
|
||||||
|
if i > 0 {
|
||||||
|
l.Outf("")
|
||||||
|
l.Outf("")
|
||||||
|
}
|
||||||
|
Print(l, t.Tasks[call.Task])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func Print(l *logger.Logger, t *taskfile.Task) {
|
func Print(l *logger.Logger, t *taskfile.Task) {
|
||||||
printTaskName(l, t)
|
printTaskName(l, t)
|
||||||
if hasSummary(t) {
|
if hasSummary(t) {
|
||||||
|
|||||||
8
task.go
8
task.go
@@ -65,13 +65,7 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if e.Summary {
|
if e.Summary {
|
||||||
for i, call := range calls {
|
summary.PrintAll(e.Logger, e.Taskfile, calls)
|
||||||
if i > 0 {
|
|
||||||
e.Logger.Outf("")
|
|
||||||
e.Logger.Outf("")
|
|
||||||
}
|
|
||||||
summary.Print(e.Logger, e.Taskfile.Tasks[call.Task])
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user