From 866e25b433e11c0430f27ffbfbfcb7991b3f3f71 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 22 Oct 2019 17:46:44 +0200 Subject: [PATCH] Fix using datetime in custom template (#83) Revert f52916076089568abe5294502042df001e43ce5d --- main.go | 8 ++++---- plugin.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index b234eed..3be25c2 100644 --- a/main.go +++ b/main.go @@ -190,12 +190,12 @@ func main() { Usage: "pull request", EnvVar: "DRONE_PULL_REQUEST", }, - cli.Int64Flag{ + cli.Float64Flag{ Name: "job.started", Usage: "job started", EnvVar: "DRONE_BUILD_STARTED", }, - cli.Int64Flag{ + cli.Float64Flag{ Name: "job.finished", Usage: "job finished", EnvVar: "DRONE_BUILD_FINISHED", @@ -281,8 +281,8 @@ func run(c *cli.Context) error { Event: c.String("build.event"), Status: c.String("build.status"), Link: c.String("build.link"), - Started: c.Int64("job.started"), - Finished: c.Int64("job.finished"), + Started: c.Float64("job.started"), + Finished: c.Float64("job.finished"), PR: c.String("pull.request"), DeployTo: c.String("deploy.to"), }, diff --git a/plugin.go b/plugin.go index 44b1a64..ad966af 100644 --- a/plugin.go +++ b/plugin.go @@ -51,8 +51,8 @@ type ( Number int Status string Link string - Started int64 - Finished int64 + Started float64 + Finished float64 PR string DeployTo string }