1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-23 09:21:56 +01:00

Add --yaml switch to exec command

This commit is contained in:
Fabio Rapposelli 2016-04-01 10:12:46 +02:00
parent 41d0709604
commit 6332a3e777

@ -63,6 +63,11 @@ var ExecCmd = cli.Command{
Name: "E",
Usage: "secrets from plaintext YAML of .drone.sec (use - for stdin)",
},
cli.StringFlag{
Name: "yaml",
Usage: "path to .drone.yml file",
Value: ".drone.yml",
},
cli.BoolFlag{
Name: "trusted",
Usage: "enable elevated privilege",
@ -96,6 +101,8 @@ var ExecCmd = cli.Command{
}
func execCmd(c *cli.Context) error {
var ymlFile = c.String("yaml")
info := git.Info()
cert, _ := ioutil.ReadFile(filepath.Join(
@ -116,7 +123,7 @@ func execCmd(c *cli.Context) error {
println("")
}
yml, err := ioutil.ReadFile(".drone.yml")
yml, err := ioutil.ReadFile(ymlFile)
if err != nil {
return err
}