Merge pull request #512 from harshavardhana/pr_out_add_build_date_using_ldflags

master
Harshavardhana 9 years ago
commit 943192f684
  1. 3
      Makefile
  2. 4
      main.go

@ -48,7 +48,8 @@ test: test-all
minio: pre-build build-all test-all
install: minio
@godep go install -a github.com/minio-io/minio && echo "Installed minio:"
@echo "Installing minio:"
@godep go install -a -ldflags "-X main.BuildDate `date '+%FT%T.%N%:z'`" github.com/minio-io/minio
save: restore
@godep save ./...

@ -243,6 +243,9 @@ func getSystemData() map[string]string {
// Version is based on MD5SUM of its binary
var Version = mustHashBinarySelf()
// BuilDate - build time
var BuilDate string
func main() {
// set up iodine
iodine.SetGlobalState("minio.version", Version)
@ -252,6 +255,7 @@ func main() {
app := cli.NewApp()
app.Name = "minio"
app.Version = Version
app.Compiled, _ = time.Parse(time.RFC3339Nano, BuilDate)
app.Author = "Minio.io"
app.Usage = "Minimalist Object Storage"
app.Flags = flags

Loading…
Cancel
Save