mirror of
https://github.com/drone/drone-cli.git
synced 2026-01-24 19:58:01 +01:00
Merge pull request #175 from micbar/add-more-flags
Add more attributes to local build context
This commit is contained in:
commit
3ba95af8d0
@ -80,6 +80,10 @@ var Command = cli.Command{
|
||||
Usage: "build source branch",
|
||||
Value: "master",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "build.source_repo",
|
||||
Usage: "repo slug of source repository",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "build.target",
|
||||
Usage: "build target branch",
|
||||
@ -98,6 +102,10 @@ var Command = cli.Command{
|
||||
Name: "build.message",
|
||||
Usage: "build commit message",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "build.title",
|
||||
Usage: "build title",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -137,13 +145,15 @@ func generate(c *cli.Context) error {
|
||||
}
|
||||
|
||||
build := starlark.StringDict{
|
||||
"event": starlark.String(c.String("build.event")),
|
||||
"branch": starlark.String(c.String("build.branch")),
|
||||
"source": starlark.String(c.String("build.source_branch")),
|
||||
"target": starlark.String(c.String("build.target_branch")),
|
||||
"ref": starlark.String(c.String("build.ref")),
|
||||
"commit": starlark.String(c.String("build.commit")),
|
||||
"message": starlark.String(c.String("build.message")),
|
||||
"event": starlark.String(c.String("build.event")),
|
||||
"branch": starlark.String(c.String("build.branch")),
|
||||
"source": starlark.String(c.String("build.source_branch")),
|
||||
"source_repo": starlark.String(c.String("build.source_repo")),
|
||||
"target": starlark.String(c.String("build.target_branch")),
|
||||
"ref": starlark.String(c.String("build.ref")),
|
||||
"commit": starlark.String(c.String("build.commit")),
|
||||
"message": starlark.String(c.String("build.message")),
|
||||
"title": starlark.String(c.String("build.title")),
|
||||
}
|
||||
|
||||
args := starlark.Tuple([]starlark.Value{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user