mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 12:12:10 -05:00
commands: Show OS and ARCH in version output
This commit is contained in:
parent
2989c38245
commit
3286b24fce
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -43,9 +44,9 @@ func printHugoVersion() {
|
||||||
formatBuildDate() // format the compile time
|
formatBuildDate() // format the compile time
|
||||||
}
|
}
|
||||||
if hugolib.CommitHash == "" {
|
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 {
|
} 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue