harness-drone/shared/deploy/bash.go

19 lines
331 B
Go
Raw Normal View History

package deploy
import (
2014-06-04 21:25:38 +00:00
"github.com/drone/drone/shared/build/buildfile"
)
type Bash struct {
Script []string `yaml:"script,omitempty"`
Command string `yaml:"command,omitempty"`
}
func (g *Bash) Write(f *buildfile.Buildfile) {
g.Script = append(g.Script, g.Command)
for _, cmd := range g.Script {
f.WriteCmd(cmd)
}
}