From 308974cf5722d2f24669a3e3b10e90272572f08f Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Mon, 16 Oct 2023 13:00:34 +0800 Subject: [PATCH] extension: fix enterprise git commit hash display in `tidb-server -V` --- Makefile.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index 8731f1c9a50c0..87be9baaa2f88 100644 --- a/Makefile.common +++ b/Makefile.common @@ -67,8 +67,8 @@ LDFLAGS += -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBGitBranch=$(shel LDFLAGS += -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBEdition=$(TIDB_EDITION)" EXTENSION_FLAG = -ifeq ($(shell if [ -d extension/enterprise/.git ]; then echo "true"; fi),true) - EXTENSION_FLAG += -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBEnterpriseExtensionGitHash=$(shell cd extension/enterprise && git rev-parse HEAD)" +ifeq ($(shell if [ -d .git/modules/extension/enterprise ]; then echo "true"; fi),true) + EXTENSION_FLAG += -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBEnterpriseExtensionGitHash=$(shell cd pkg/extension/enterprise && git rev-parse HEAD)" endif TEST_LDFLAGS = -X "github.com/pingcap/tidb/pkg/config.checkBeforeDropLDFlag=1"