1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-03-11 13:59:36 +02:00

21 lines
470 B
Go
Raw Normal View History

package deploy
import (
"fmt"
"github.com/drone/drone/pkg/build/buildfile"
)
type Modulus struct {
Project string `yaml:"project,omitempty"`
Token string `yaml:"token,omitempty"`
}
func (m *Modulus) Write(f *buildfile.Buildfile) {
f.writeEnv("MODULUS_TOKEN", m.Token)
// Install the Modulus command line interface then deploy the configured
// project.
f.WriteCmdSilent("npm install -g modulus")
f.WriteCmd(fmt.Sprintf("modulus deploy -p '%s'", m.App))
}