1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-12 08:23:48 +02:00
woodpecker/plugin/deploy/bash.go
2014-09-07 23:08:35 -07:00

26 lines
507 B
Go

package deploy
import (
"github.com/drone/drone/plugin/condition"
"github.com/drone/drone/shared/build/buildfile"
)
type Bash struct {
Script []string `yaml:"script,omitempty"`
Command string `yaml:"command,omitempty"`
Condition *condition.Condition `yaml:"when,omitempty"`
}
func (g *Bash) Write(f *buildfile.Buildfile) {
g.Script = append(g.Script, g.Command)
for _, cmd := range g.Script {
f.WriteCmd(cmd)
}
}
func (g *Bash) GetCondition() *condition.Condition {
return g.Condition
}