diff --git a/Makefile b/Makefile index 75eca952b1..daaa6bd3e3 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ CHAINNET?=betanet BINARY?=sifnoded +GOPATH?=$(shell go env GOPATH) GOBIN?=${GOPATH}/bin NOW=$(shell date +'%Y-%m-%d_%T') COMMIT:=$(shell git log -1 --format='%H') VERSION:=$(shell cat version) IMAGE_TAG?=latest HTTPS_GIT := https://github.com/sifchain/sifnode.git -DOCKER := $(shell which docker) +DOCKER ?= docker DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=sifchain \ @@ -84,23 +85,26 @@ rollback: ### Protobuf ### ############################################################################### +protoVer=v0.3 +protoImageName=tendermintdev/sdk-proto-gen:$(protoVer) + proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh + $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) sh ./scripts/protocgen.sh .PHONY: proto-gen proto-format: @echo "Formatting Protobuf files" $(DOCKER) run --rm -v $(CURDIR):/workspace \ - --workdir /workspace tendermintdev/docker-build-proto \ + --workdir /workspace $(protoImageName) \ find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; .PHONY: proto-format # This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed proto-gen-any: - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh + $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) sh ./scripts/protocgen-any.sh .PHONY: proto-gen-any proto-swagger-gen: