fix: update build.started env

This commit is contained in:
Bo-Yi Wu 2019-10-13 02:09:01 +08:00
parent 1904582239
commit f529160760
2 changed files with 8 additions and 8 deletions

12
main.go
View File

@ -185,15 +185,15 @@ func main() {
Usage: "pull request", Usage: "pull request",
EnvVar: "DRONE_PULL_REQUEST", EnvVar: "DRONE_PULL_REQUEST",
}, },
cli.Float64Flag{ cli.Int64Flag{
Name: "job.started", Name: "job.started",
Usage: "job started", Usage: "job started",
EnvVar: "DRONE_JOB_STARTED", EnvVar: "DRONE_BUILD_STARTED",
}, },
cli.Float64Flag{ cli.Int64Flag{
Name: "job.finished", Name: "job.finished",
Usage: "job finished", Usage: "job finished",
EnvVar: "DRONE_JOB_FINISHED", EnvVar: "DRONE_BUILD_FINISHED",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "env-file", Name: "env-file",
@ -276,8 +276,8 @@ func run(c *cli.Context) error {
Event: c.String("build.event"), Event: c.String("build.event"),
Status: c.String("build.status"), Status: c.String("build.status"),
Link: c.String("build.link"), Link: c.String("build.link"),
Started: c.Float64("job.started"), Started: c.Int64("job.started"),
Finished: c.Float64("job.finished"), Finished: c.Int64("job.finished"),
PR: c.String("pull.request"), PR: c.String("pull.request"),
DeployTo: c.String("deploy.to"), DeployTo: c.String("deploy.to"),
}, },

View File

@ -48,8 +48,8 @@ type (
Number int Number int
Status string Status string
Link string Link string
Started float64 Started int64
Finished float64 Finished int64
PR string PR string
DeployTo string DeployTo string
} }