diff --git a/golang/cosmos/Makefile b/golang/cosmos/Makefile index 0429668f13c..803d169aefd 100644 --- a/golang/cosmos/Makefile +++ b/golang/cosmos/Makefile @@ -61,10 +61,10 @@ node-compile-gyp: npm run build:gyp; \ fi -compile-agd: go-mod-cache +compile-agd: go.sum go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=exe -o build/agd ./cmd/agd -install-agd: go-mod-cache +install-agd: go.sum go install -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=exe ./cmd/agd # Only run from the package.json build:gyp script. @@ -73,17 +73,18 @@ compile-gyp: node-gyp configure build $(GYP_DEBUG) || { status=$$?; rm -f binding.gyp; exit $$status; } rm -f binding.gyp -compile-libdaemon: go-mod-cache +compile-libdaemon: go.sum go build -v $(MOD_READONLY) $(SHARED_BUILD_FLAGS) -buildmode=c-shared \ -o build/libagcosmosdaemon.so ./cmd/libdaemon/main.go -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" + @echo "--> Ensure dependencies have not been modified unless suppressed by SKIP_MOD_VERIFY ..." +ifndef SKIP_MOD_VERIFY GO111MODULE=on go mod verify +endif + GO111MODULE=on go mod tidy + @echo "--> Download go modules to local cache" + go mod download ############################################################################### ### Protobuf ### diff --git a/packages/cosmic-proto/update-protos.sh b/packages/cosmic-proto/update-protos.sh index 3e73512067f..2c65c328070 100755 --- a/packages/cosmic-proto/update-protos.sh +++ b/packages/cosmic-proto/update-protos.sh @@ -7,7 +7,7 @@ AG_SDK=$(readlink -f "$(dirname -- "$(readlink -f -- "$0")")/../..") # go ensure fresh build cd "$AG_SDK"/golang/cosmos -make go-mod-cache +SKIP_MOD_VERIFY=1 make go.sum COSMOS_SDK=$(go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk) IBC_GO=$(go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6) cd -