commands: Show OS and ARCH in version output
authorCameron Moore <moorereason@gmail.com>
Wed, 4 Jan 2017 20:13:15 +0000 (14:13 -0600)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 6 Jan 2017 10:54:53 +0000 (11:54 +0100)
commands/version.go

index 348464227ed11ff97d2ea894f9421e854b42e302..f026c13a5d1628bd4c774fe3eb512eb4a95ddcdf 100644 (file)
@@ -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)
        }
 }