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 <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2024-07-03 14:44:13 +08:00 committed by GitHub
parent 32c943f1bc
commit 776ffee840
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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