Merge pull request #534 from fkautz/pr_out_version_number_now_set_through_ldflags_in_makefile

This commit is contained in:
Frederick F. Kautz IV
2015-04-24 20:00:14 -07:00
4 changed files with 7 additions and 14 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ env:
install: test-all
@echo "Installing mc:"
@godep go install -a github.com/minio-io/mc
@godep go install -ldflags "-X main.Version `git rev-parse HEAD`" github.com/minio-io/mc
@mkdir -p $(HOME)/.mc
clean:
-9
View File
@@ -1,9 +0,0 @@
/*
* ** DO NOT EDIT THIS FILE. THIS FILE IS AUTO POPULATED BY GIT **
*/
package main
const (
mcGitCommitHash = "$Id$"
)
+1 -3
View File
@@ -20,7 +20,6 @@ package main
import (
"os"
"runtime"
"strings"
)
var (
@@ -29,6 +28,5 @@ var (
globalMaxRetryFlag = 5 // Maximum number of retries
mcUserAgent = "Minio/" +
strings.SplitN(mcGitCommitHash, " ", 3)[1] +
" (" + os.Args[0] + "; " + runtime.GOOS + "; " + runtime.GOARCH + ")"
Version + " (" + os.Args[0] + "; " + runtime.GOOS + "; " + runtime.GOARCH + ")"
)
+5 -1
View File
@@ -78,10 +78,14 @@ func getSystemData() map[string]string {
}
}
// Version number
var Version = "Development"
func main() {
app := cli.NewApp()
app.Usage = "Mini Copy for object storage and filesystems"
app.Version = mcGitCommitHash
log.Println(Version)
app.Version = Version
app.Commands = options
app.Flags = flags
app.Author = "Minio.io"