Add build date to LDFLAGS

This commit is contained in:
2021-03-02 20:41:18 -06:00
parent de0bc2e133
commit 38ab315a9b
3 changed files with 11 additions and 2 deletions

View File

@ -30,6 +30,7 @@ func init() {
}
var Version string = "0.1.0-pre"
var BuildDate string
const lumercFile string = ".lumerc"

View File

@ -19,5 +19,8 @@ func VersionCmd(args CmdArgs) (int, error) {
fmt.Printf("lume %s\n", Version)
fmt.Printf(" os/arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
fmt.Printf(" go version: %s\n", runtime.Version())
if BuildDate != "" {
fmt.Printf(" build date: %s\n", BuildDate)
}
return ExitSuccess, nil
}