1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

Add hability to globally set environment variables

Closes #138
This commit is contained in:
Andrey Nering
2019-01-02 12:05:40 -02:00
parent 5572e31fd4
commit aac6c5a1c7
6 changed files with 51 additions and 16 deletions

View File

@@ -7,6 +7,7 @@ type Taskfile struct {
Output string
Includes map[string]string
Vars Vars
Env Vars
Tasks Tasks
}
@@ -23,6 +24,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
Output string
Includes map[string]string
Vars Vars
Env Vars
Tasks Tasks
}
if err := unmarshal(&taskfile); err != nil {
@@ -33,6 +35,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
tf.Output = taskfile.Output
tf.Includes = taskfile.Includes
tf.Vars = taskfile.Vars
tf.Env = taskfile.Env
tf.Tasks = taskfile.Tasks
if tf.Expansions <= 0 {
tf.Expansions = 2