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:
parent
9ba252db9d
commit
3c59b5fba1
|
@ -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
|
||||
|
|
|
@ -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)",
|
||||
|
|
Loading…
Reference in New Issue