From 2e5ac64a46eb93e2e3191178d1545e53d9cfc8f9 Mon Sep 17 00:00:00 2001 From: nakabonne Date: Thu, 14 May 2020 08:17:00 +0900 Subject: [PATCH] Emit commit and build date --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 8ef6ce5..00499c4 100644 --- a/main.go +++ b/main.go @@ -24,8 +24,8 @@ var ( } // Automatically populated by goreleaser during build version = "unversioned" - commit = "" - date = "" + commit = "?" + date = "?" ) type cli struct { @@ -57,7 +57,7 @@ func main() { func (c *cli) run() int { if c.versionFlag { - fmt.Fprintf(c.stderr, "version=%s, os=%s, arch=%s\n", version, runtime.GOOS, runtime.GOARCH) + fmt.Fprintf(c.stderr, "version=%s, commit=%s, buildDate=%s, os=%s, arch=%s\n", version, commit, date, runtime.GOOS, runtime.GOARCH) return 0 }