From 454dcdba8934b05af17c111bb0e6afb6e1730300 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Thu, 8 Feb 2024 09:04:58 -0500 Subject: [PATCH] build: Improve Makefile alignment with cosmos-sdk (#2915) * Makefile: Improve alignment with cosmos-sdk Ref https://github.com/cosmos/cosmos-sdk/commit/6c1c2cce0461cfbbf6eb05060e28e7e000d4c906 * accept suggestion to allow skipping mod verify Co-authored-by: Richard Gibson --------- Co-authored-by: MSalopek --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e0ae22191c3..dc0c60d46a2 100644 --- a/Makefile +++ b/Makefile @@ -119,13 +119,15 @@ vulncheck: $(BUILDDIR)/ build-linux: go.sum LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build -go-mod-cache: go.sum - @echo "--> Download go modules to local cache" - @go mod download - go.sum: go.mod @echo "--> Ensure dependencies have not been modified" - @go mod verify + @echo "--> Ensure dependencies have not been modified unless suppressed by SKIP_MOD_VERIFY" +ifndef SKIP_MOD_VERIFY + go mod verify +endif + go mod tidy + @echo "--> Download go modules to local cache" + go mod download draw-deps: @# requires brew install graphviz or apt-get install graphviz @@ -279,7 +281,7 @@ test-docker-push: test-docker @docker push ${TEST_DOCKER_REPO}:$(shell git rev-parse --abbrev-ref HEAD | sed 's#/#_#g') @docker push ${TEST_DOCKER_REPO}:latest -.PHONY: all build-linux install format lint go-mod-cache draw-deps clean build \ +.PHONY: all build-linux install format lint draw-deps clean build \ docker-build-debug docker-build-hermes docker-build-all