Skip to content

Commit

Permalink
update the output of version (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangXiangUSTC authored Nov 16, 2020
1 parent 399be9f commit d368cac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH)))
export PATH := $(path_to_add):$(PATH)


LDFLAGS += -X "github.com/pingcap/tidb-tools/pkg/utils.Version=1.0.0~rc2+git.$(shell git rev-parse --short HEAD)"
LDFLAGS += -X "github.com/pingcap/tidb-tools/pkg/utils.Version=$(shell git describe --tags --dirty --always)"
LDFLAGS += -X "github.com/pingcap/tidb-tools/pkg/utils.BuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
LDFLAGS += -X "github.com/pingcap/tidb-tools/pkg/utils.GitHash=$(shell git rev-parse HEAD)"
LDFLAGS += -X "github.com/pingcap/tidb-tools/pkg/utils.GitBranch=$(shell git rev-parse --abbrev-ref HEAD)"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
// GetRawInfo do what its name tells
func GetRawInfo(app string) string {
info := ""
info += fmt.Sprintf("%s: v%s\n", app, Version)
info += fmt.Sprintf("%s: %s\n", app, Version)
info += fmt.Sprintf("Git Commit Hash: %s\n", GitHash)
info += fmt.Sprintf("Git Branch: %s\n", GitBranch)
info += fmt.Sprintf("UTC Build Time: %s\n", BuildTS)
Expand Down

0 comments on commit d368cac

Please sign in to comment.