mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Add build date using ldflags
This commit is contained in:
parent
66747399fd
commit
096a994c7b
3
Makefile
3
Makefile
@ -48,7 +48,8 @@ test: test-all
|
|||||||
minio: pre-build build-all test-all
|
minio: pre-build build-all test-all
|
||||||
|
|
||||||
install: minio
|
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
|
save: restore
|
||||||
@godep save ./...
|
@godep save ./...
|
||||||
|
4
main.go
4
main.go
@ -243,6 +243,9 @@ func getSystemData() map[string]string {
|
|||||||
// Version is based on MD5SUM of its binary
|
// Version is based on MD5SUM of its binary
|
||||||
var Version = mustHashBinarySelf()
|
var Version = mustHashBinarySelf()
|
||||||
|
|
||||||
|
// BuilDate - build time
|
||||||
|
var BuilDate string
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// set up iodine
|
// set up iodine
|
||||||
iodine.SetGlobalState("minio.version", Version)
|
iodine.SetGlobalState("minio.version", Version)
|
||||||
@ -252,6 +255,7 @@ func main() {
|
|||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "minio"
|
app.Name = "minio"
|
||||||
app.Version = Version
|
app.Version = Version
|
||||||
|
app.Compiled, _ = time.Parse(time.RFC3339Nano, BuilDate)
|
||||||
app.Author = "Minio.io"
|
app.Author = "Minio.io"
|
||||||
app.Usage = "Minimalist Object Storage"
|
app.Usage = "Minimalist Object Storage"
|
||||||
app.Flags = flags
|
app.Flags = flags
|
||||||
|
Loading…
x
Reference in New Issue
Block a user