From b07d428f71353463b6fbf1ed19b969d35b2d7139 Mon Sep 17 00:00:00 2001 From: Robert Pirtle Date: Wed, 9 Aug 2023 15:49:00 -0700 Subject: [PATCH] update build dir make commands with GO_BIN --- build/deps.mk | 9 +++++---- build/proto-deps.mk | 13 +++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/build/deps.mk b/build/deps.mk index 7d10035a27..df02675332 100644 --- a/build/deps.mk +++ b/build/deps.mk @@ -27,10 +27,11 @@ DIRS := $(BUILD_CACHE_DIR) $(BIN_DIR) ################################################################################ ### Tool Versions ### ################################################################################ +GO_BIN ?= go PROTOC_VERSION ?= v21.9 BUF_VERSION ?= v1.9.0 PROTOC_GEN_GOCOSMOS_VERSION ?= v0.3.1 -PROTOC_GEN_GRPC_GATEWAY_VERSION ?= $(shell go list -m github.com/grpc-ecosystem/grpc-gateway| sed 's:.* ::') +PROTOC_GEN_GRPC_GATEWAY_VERSION ?= $(shell $(GO_BIN) list -m github.com/grpc-ecosystem/grpc-gateway| sed 's:.* ::') PROTOC_GEN_DOC_VERSION ?= v1.5.1 SWAGGER_COMBINE_VERSION ?= v1.4.0 @@ -115,7 +116,7 @@ $(PROTOC_GEN_GOCOSMOS_VERSION_FILE): git clone -q https://github.com/regen-network/cosmos-proto.git; \ cd cosmos-proto; \ git checkout -q $(PROTOC_GEN_GOCOSMOS_VERSION); \ - GOBIN=$(ROOT_DIR)/$(BIN_DIR) go install ./protoc-gen-gocosmos + GOBIN=$(ROOT_DIR)/$(BIN_DIR) $(GO_BIN) install ./protoc-gen-gocosmos @rm -rf $(BUILD_CACHE_DIR)/protoc-gen-gocosmos PROTOC_GEN_GOCOSMOS := $(BIN_DIR)/protoc-gen-gocosmos @@ -138,8 +139,8 @@ $(PROTOC_GEN_GRPC_GATEWAY_VERSION_FILE): git clone -q https://github.com/grpc-ecosystem/grpc-gateway.git; \ cd grpc-gateway; \ git checkout -q $(PROTOC_GEN_GRPC_GATEWAY_VERSION); \ - GOBIN=$(ROOT_DIR)/$(BIN_DIR) go install ./protoc-gen-grpc-gateway; \ - GOBIN=$(ROOT_DIR)/$(BIN_DIR) go install ./protoc-gen-swagger + GOBIN=$(ROOT_DIR)/$(BIN_DIR) $(GO_BIN) install ./protoc-gen-grpc-gateway; \ + GOBIN=$(ROOT_DIR)/$(BIN_DIR) $(GO_BIN) install ./protoc-gen-swagger @rm -rf $(BUILD_CACHE_DIR)/protoc-gen-grpc-gateway PROTOC_GEN_GRPC_GATEWAY := $(BIN_DIR)/protoc-gen-grpc-gateway diff --git a/build/proto-deps.mk b/build/proto-deps.mk index 2caae24326..af040e4f5a 100644 --- a/build/proto-deps.mk +++ b/build/proto-deps.mk @@ -1,4 +1,5 @@ RSYNC_BIN ?= rsync +GO_BIN ?= go # # Versioning for google protobuf dependencies (any, http, etc) and @@ -13,12 +14,12 @@ PROTOBUF_ANY_DOWNLOAD_URL = https://raw.githubusercontent.com/protocolbuffers/pr # # Proto dependencies under go.mod # -GOGO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/gogo/protobuf) -TENDERMINT_PATH := $(shell go list -m -f '{{.Dir}}' github.com/tendermint/tendermint) -COSMOS_PROTO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/cosmos-proto) -COSMOS_SDK_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/cosmos-sdk) -IBC_GO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/ibc-go/v6) -ETHERMINT_PATH := $(shell go list -m -f '{{.Dir}}' github.com/evmos/ethermint) +GOGO_PATH := $(shell $(GO_BIN) list -m -f '{{.Dir}}' github.com/gogo/protobuf) +TENDERMINT_PATH := $(shell $(GO_BIN) list -m -f '{{.Dir}}' github.com/tendermint/tendermint) +COSMOS_PROTO_PATH := $(shell $(GO_BIN) list -m -f '{{.Dir}}' github.com/cosmos/cosmos-proto) +COSMOS_SDK_PATH := $(shell $(GO_BIN) list -m -f '{{.Dir}}' github.com/cosmos/cosmos-sdk) +IBC_GO_PATH := $(shell $(GO_BIN) list -m -f '{{.Dir}}' github.com/cosmos/ibc-go/v6) +ETHERMINT_PATH := $(shell $(GO_BIN) list -m -f '{{.Dir}}' github.com/evmos/ethermint) # # Common target directories