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

Add support for 'platforms' in both task and command (#980)

This commit is contained in:
Lea Anthony
2023-01-07 11:38:35 +11:00
committed by GitHub
parent 63c50d13ee
commit aa6c7e4b94
10 changed files with 295 additions and 0 deletions

View File

@ -14,6 +14,7 @@ type Cmd struct {
Vars *Vars
IgnoreError bool
Defer bool
Platforms []*Platform
}
// Dep is a task dependency
@ -40,11 +41,13 @@ func (c *Cmd) UnmarshalYAML(node *yaml.Node) error {
Cmd string
Silent bool
IgnoreError bool `yaml:"ignore_error"`
Platforms []*Platform
}
if err := node.Decode(&cmdStruct); err == nil && cmdStruct.Cmd != "" {
c.Cmd = cmdStruct.Cmd
c.Silent = cmdStruct.Silent
c.IgnoreError = cmdStruct.IgnoreError
c.Platforms = cmdStruct.Platforms
return nil
}