diff options
Diffstat (limited to 'commands/version.go')
-rw-r--r-- | commands/version.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/version.go b/commands/version.go index 71ffd625b..dfa79bb69 100644 --- a/commands/version.go +++ b/commands/version.go @@ -45,7 +45,11 @@ func newVersionCmd() *versionCmd { func printHugoVersion() { if hugolib.CommitHash == "" { - jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, runtime.GOOS, runtime.GOARCH, hugolib.BuildDate) + if hugolib.BuildDate == "" { + jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s\n", helpers.CurrentHugoVersion, runtime.GOOS, runtime.GOARCH) + } else { + jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, runtime.GOOS, runtime.GOARCH, hugolib.BuildDate) + } } else { jww.FEEDBACK.Printf("Hugo Static Site Generator v%s-%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, strings.ToUpper(hugolib.CommitHash), runtime.GOOS, runtime.GOARCH, hugolib.BuildDate) } |