From: Cameron Moore Date: Wed, 4 Jan 2017 20:13:15 +0000 (-0600) Subject: commands: Show OS and ARCH in version output X-Git-Tag: v0.19~120 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3286b24f;p=brevno-suite%2Fhugo commands: Show OS and ARCH in version output --- diff --git a/commands/version.go b/commands/version.go index 34846422..f026c13a 100644 --- a/commands/version.go +++ b/commands/version.go @@ -16,6 +16,7 @@ package commands import ( "os" "path/filepath" + "runtime" "strings" "time" @@ -43,9 +44,9 @@ func printHugoVersion() { formatBuildDate() // format the compile time } if hugolib.CommitHash == "" { - jww.FEEDBACK.Printf("Hugo Static Site Generator v%s BuildDate: %s\n", helpers.HugoVersion(), hugolib.BuildDate) + jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s BuildDate: %s\n", helpers.HugoVersion(), runtime.GOOS, runtime.GOARCH, hugolib.BuildDate) } else { - jww.FEEDBACK.Printf("Hugo Static Site Generator v%s-%s BuildDate: %s\n", helpers.HugoVersion(), strings.ToUpper(hugolib.CommitHash), hugolib.BuildDate) + jww.FEEDBACK.Printf("Hugo Static Site Generator v%s-%s %s/%s BuildDate: %s\n", helpers.HugoVersion(), strings.ToUpper(hugolib.CommitHash), runtime.GOOS, runtime.GOARCH, hugolib.BuildDate) } }