Skip to content

Commit

Permalink
makefile: add customized release version support (#27692)
Browse files Browse the repository at this point in the history
  • Loading branch information
AilinKid authored Aug 31, 2021
1 parent 05d2210 commit 1361da9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ UNCONVERT_PACKAGES := $$($(UNCONVERT_PACKAGES_LIST))
FAILPOINT_ENABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl enable)
FAILPOINT_DISABLE := $$(find $$PWD/ -type d | grep -vE "(\.git|tools)" | xargs tools/bin/failpoint-ctl disable)

# Customized release version for customers. Example:
# LDFLAGS += -X "github.com/pingcap/parser/mysql.CustomizedReleaseVersion=$(shell echo "UbiSQL-v1.0.0-rc1")"
LDFLAGS += -X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=$(shell git describe --tags --dirty --always)"
LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %H:%M:%S')"
LDFLAGS += -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=$(shell git rev-parse HEAD)"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ require (
github.com/pingcap/fn v0.0.0-20200306044125-d5540d389059
github.com/pingcap/kvproto v0.0.0-20210806074406-317f69fb54b4
github.com/pingcap/log v0.0.0-20210818144256-6455d4a4c6f9
github.com/pingcap/parser v0.0.0-20210824033804-d603e545f624
github.com/pingcap/parser v0.0.0-20210831085004-b5390aa83f65
github.com/pingcap/sysutil v0.0.0-20210730114356-fcd8a63f68c5
github.com/pingcap/tidb-tools v5.0.3+incompatible
github.com/pingcap/tipb v0.0.0-20210708040514-0f154bb0dc0f
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuR
github.com/pingcap/log v0.0.0-20210818144256-6455d4a4c6f9 h1:6t7vOzOGF3/iz+wpcwu8N/+aoWTOMq2xc+Y0pYMJOhU=
github.com/pingcap/log v0.0.0-20210818144256-6455d4a4c6f9/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
github.com/pingcap/parser v0.0.0-20210525032559-c37778aff307/go.mod h1:xZC8I7bug4GJ5KtHhgAikjTfU4kBv1Sbo3Pf1MZ6lVw=
github.com/pingcap/parser v0.0.0-20210824033804-d603e545f624 h1:HUPV3A0qVkk/iARDqYZIthwvynYYlf0BtjKGWJr0XH8=
github.com/pingcap/parser v0.0.0-20210824033804-d603e545f624/go.mod h1:Ek0mLKEqUGnQqBw1JnYrJQxsguU433DU68yUbsoeJ7s=
github.com/pingcap/parser v0.0.0-20210831085004-b5390aa83f65 h1:pWIhXRyuRoheeAx62zIfz5xYzX4IHjDnYHX2dDuiEqY=
github.com/pingcap/parser v0.0.0-20210831085004-b5390aa83f65/go.mod h1:Ek0mLKEqUGnQqBw1JnYrJQxsguU433DU68yUbsoeJ7s=
github.com/pingcap/sysutil v0.0.0-20200206130906-2bfa6dc40bcd/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI=
github.com/pingcap/sysutil v0.0.0-20210315073920-cc0985d983a3/go.mod h1:tckvA041UWP+NqYzrJ3fMgC/Hw9wnmQ/tUkp/JaHly8=
github.com/pingcap/sysutil v0.0.0-20210730114356-fcd8a63f68c5 h1:7rvAtZe/ZUzOKzgriNPQoBNvleJXBk4z7L3Z47+tS98=
Expand Down

0 comments on commit 1361da9

Please sign in to comment.