From 0d88f2ee79913c5187ae16ae7855402c56f7b5c9 Mon Sep 17 00:00:00 2001 From: weekface Date: Wed, 3 Jul 2019 17:34:21 +0800 Subject: [PATCH] remove tidb version from build --- hack/version.sh | 6 ------ version/types.go | 1 - version/version.go | 4 ---- 3 files changed, 11 deletions(-) diff --git a/hack/version.sh b/hack/version.sh index b5c9c5df58..9e73b1fb6c 100755 --- a/hack/version.sh +++ b/hack/version.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -TIDB_VERSION=${TIDB_VERSION:-2.1.0} - # ----------------------------------------------------------------------------- # Version management helpers. These functions help to set the # following variables: @@ -81,10 +79,6 @@ function tidb_operator::version::ldflags() { ldflags+=($(tidb_operator::version::ldflag "gitVersion" "${GIT_VERSION}")) fi - if [[ -n ${TIDB_VERSION-} ]]; then - ldflags+=($(tidb_operator::version::ldflag "tidbVersion" "${TIDB_VERSION}")) - fi - # The -ldflags parameter takes a single string, so join the output. echo "${ldflags[*]-}" } diff --git a/version/types.go b/version/types.go index fd91863f87..5cb92fcfbd 100644 --- a/version/types.go +++ b/version/types.go @@ -15,7 +15,6 @@ package version // Info contains versioning information. type Info struct { - TiDBVersion string `json:"tidbVersion"` GitVersion string `json:"gitVersion"` GitCommit string `json:"gitCommit"` GitTreeState string `json:"gitTreeState"` diff --git a/version/version.go b/version/version.go index 58c1f141b6..65c32226fd 100644 --- a/version/version.go +++ b/version/version.go @@ -21,9 +21,6 @@ import ( ) var ( - // tidbVersion and tidbVersion will be set during make - tidbVersion = "None" - gitVersion = "v0.0.0-master+$Format:%h$" gitCommit = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) gitTreeState = "" // state of git tree, either "clean" or "dirty" @@ -47,7 +44,6 @@ func LogVersionInfo() { func Get() Info { // These variables typically come from -ldflags settings and in return Info{ - TiDBVersion: tidbVersion, GitVersion: gitVersion, GitCommit: gitCommit, GitTreeState: gitTreeState,