1
0
Fork 0
mirror of https://github.com/drone/drone-cli.git synced 2024-06-08 15:06:04 +02:00

add --sha commandline param to drone exec

This commit is contained in:
Ed Ceaser 2020-05-12 14:42:41 -07:00
parent 9ba252db9d
commit 3c59b5fba1
2 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,10 @@ func getEnv(c *cli.Context) map[string]string {
v := c.String("ref")
env["DRONE_COMMIT_REF"] = v
}
if c.IsSet("sha") {
v := c.String("sha")
env["DRONE_COMMIT_SHA"] = v
}
if c.IsSet("repo") {
v := c.String("repo")
env["DRONE_REPO"] = v

View File

@ -136,6 +136,10 @@ var Command = cli.Command{
Name: "ref",
Usage: "git reference",
},
cli.StringFlag{
Name: "sha",
Usage: "git sha",
},
cli.StringFlag{
Name: "repo",
Usage: "git repository name (e.g. octocat/hello-world)",