From 776ffee8409d5d77225fdb28a4a9d33cc1771275 Mon Sep 17 00:00:00 2001 From: congqixia Date: Wed, 3 Jul 2024 14:44:13 +0800 Subject: [PATCH] enhance: Tag gotestsum version when install deps (#34308) Tagging gotestsum by ldflags to prevent reinstall gotestsum binary each local run Signed-off-by: Congqi Xia --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ad5df31749..9d6a0b07a1 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ getdeps: echo "Mockery v$(MOCKERY_VERSION) already installed"; \ fi @if [ -z "$(INSTALL_GOTESTSUM)" ]; then \ - echo "Install gotestsum v$(GOTESTSUM_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install gotest.tools/gotestsum@v$(GOTESTSUM_VERSION); \ + echo "Install gotestsum v$(GOTESTSUM_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install -ldflags="-X 'gotest.tools/gotestsum/cmd.version=$(GOTESTSUM_VERSION)'" gotest.tools/gotestsum@v$(GOTESTSUM_VERSION); \ else \ echo "gotestsum v$(GOTESTSUM_VERSION) already installed";\ fi