Skip to content

Commit

Permalink
update build dir make commands with GO_BIN
Browse files Browse the repository at this point in the history
  • Loading branch information
pirtleshell committed Aug 9, 2023
1 parent e9a782e commit 8884f2b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions build/deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ DIRS := $(BUILD_CACHE_DIR) $(BIN_DIR)
################################################################################
### Tool Versions ###
################################################################################
GOBIN ?= 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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 7 additions & 6 deletions build/proto-deps.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
RSYNC_BIN ?= rsync
GOBIN ?= go

#
# Versioning for google protobuf dependencies (any, http, etc) and
Expand All @@ -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 $(GOBIN) list -m -f '{{.Dir}}' github.com/gogo/protobuf)
TENDERMINT_PATH := $(shell $(GOBIN) list -m -f '{{.Dir}}' github.com/tendermint/tendermint)
COSMOS_PROTO_PATH := $(shell $(GOBIN) list -m -f '{{.Dir}}' github.com/cosmos/cosmos-proto)
COSMOS_SDK_PATH := $(shell $(GOBIN) list -m -f '{{.Dir}}' github.com/cosmos/cosmos-sdk)
IBC_GO_PATH := $(shell $(GOBIN) list -m -f '{{.Dir}}' github.com/cosmos/ibc-go/v6)
ETHERMINT_PATH := $(shell $(GOBIN) list -m -f '{{.Dir}}' github.com/evmos/ethermint)

#
# Common target directories
Expand Down

0 comments on commit 8884f2b

Please sign in to comment.