1
0
mirror of https://github.com/go-task/task.git synced 2025-07-05 00:58:54 +02:00

use YAML for dynamix variable instead of $ prefix

$ prefix still works but is now deprecated

before:

    VAR: $echo var

after:

    VAR:
      sh: echo bar

closes #46
This commit is contained in:
Andrey Nering
2017-07-15 15:28:59 -03:00
parent d22b3b0d88
commit e8e914b11c
6 changed files with 89 additions and 22 deletions

View File

@ -33,7 +33,10 @@ vars:
{
yamlTaskCall,
&task.Cmd{},
&task.Cmd{Task: "another-task", Vars: task.Vars{"PARAM1": "VALUE1", "PARAM2": "VALUE2"}},
&task.Cmd{Task: "another-task", Vars: task.Vars{
"PARAM1": task.Var{Static: "VALUE1"},
"PARAM2": task.Var{Static: "VALUE2"},
}},
},
{
yamlDep,
@ -43,7 +46,10 @@ vars:
{
yamlTaskCall,
&task.Dep{},
&task.Dep{Task: "another-task", Vars: task.Vars{"PARAM1": "VALUE1", "PARAM2": "VALUE2"}},
&task.Dep{Task: "another-task", Vars: task.Vars{
"PARAM1": task.Var{Static: "VALUE1"},
"PARAM2": task.Var{Static: "VALUE2"},
}},
},
}
for _, test := range tests {