From 1b220f5ef60d5f1a8db16dce10b0dd4931f0935c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=B6=85?= Date: Mon, 16 Oct 2023 16:33:29 +0800 Subject: [PATCH] extension: fix make enterprise-server failed (#47658) close pingcap/tidb#47646 --- Makefile | 2 +- Makefile.common | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2e17180cf4181..b8ea76a607e18 100644 --- a/Makefile +++ b/Makefile @@ -171,7 +171,7 @@ else endif init-submodule: - # git submodule init && git submodule update --force + git submodule init && git submodule update --force enterprise-prepare: cd pkg/extension/enterprise/generate && $(GO) generate -run genfile main.go diff --git a/Makefile.common b/Makefile.common index 87be9baaa2f88..b3139c8e4a6ad 100644 --- a/Makefile.common +++ b/Makefile.common @@ -67,7 +67,7 @@ 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 .git/modules/extension/enterprise ]; then echo "true"; fi),true) +ifeq ($(shell if [ -f pkg/extension/enterprise/.git ]; 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