1
0
mirror of https://github.com/go-task/task.git synced 2025-06-27 00:51:05 +02:00

initial pass at deferred commands

This commit is contained in:
Jacob McCollum
2021-12-15 00:03:37 -05:00
parent 1c782c599f
commit 69e9effc88
6 changed files with 78 additions and 0 deletions

View File

@ -19,6 +19,8 @@ vars:
PARAM1: VALUE1
PARAM2: VALUE2
`
yamlDeferredTask = `defer: ^some_task`
yamlDeferredCmd = `defer: echo 'test'`
)
tests := []struct {
content string
@ -41,6 +43,16 @@ vars:
},
}},
},
{
yamlDeferredCmd,
&taskfile.Cmd{},
&taskfile.Cmd{Cmd: "echo 'test'", Defer: true},
},
{
yamlDeferredTask,
&taskfile.Cmd{},
&taskfile.Cmd{Task: "some_task", Defer: true},
},
{
yamlDep,
&taskfile.Dep{},