All Makefile proto commands use Docker (#7931)
* Update tooling around docker * Run commands * Remove swagger gen for now * Update proto-gen-any * Fix indentn * Use CURDIR Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
co-authored by
Alessio Treglia
parent
6e3fab854f
commit
a8ef4a380d
@@ -10,7 +10,7 @@ BUILDDIR ?= $(CURDIR)/build
|
||||
SIMAPP = ./simapp
|
||||
MOCKS_DIR = $(CURDIR)/tests/mocks
|
||||
HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git
|
||||
DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf
|
||||
DOCKER_BUF := docker run -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
|
||||
|
||||
export GO111MODULE = on
|
||||
|
||||
@@ -356,43 +356,30 @@ devdoc-update:
|
||||
### Protobuf ###
|
||||
###############################################################################
|
||||
|
||||
proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-gen proto-format
|
||||
proto-all: proto-format proto-lint proto-check-breaking proto-gen
|
||||
|
||||
proto-gen:
|
||||
@./scripts/protocgen.sh
|
||||
|
||||
proto-gen-docker:
|
||||
@echo "Generating Protobuf files"
|
||||
docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
|
||||
.PHONY: proto-gen-docker
|
||||
docker run -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
|
||||
|
||||
proto-format:
|
||||
@echo "Formatting Protobuf files"
|
||||
docker run -v $(shell pwd):/workspace \
|
||||
docker run -v $(CURDIR):/workspace \
|
||||
--workdir /workspace tendermintdev/docker-build-proto \
|
||||
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:
|
||||
@./scripts/protocgen-any.sh
|
||||
docker run -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh
|
||||
|
||||
proto-swagger-gen:
|
||||
@./scripts/protoc-swagger-gen.sh
|
||||
|
||||
proto-lint:
|
||||
@buf check lint --error-format=json
|
||||
@$(DOCKER_BUF) check lint --error-format=json
|
||||
|
||||
proto-check-breaking:
|
||||
@buf check breaking --against-input '.git#branch=master'
|
||||
|
||||
proto-lint-docker:
|
||||
@$(DOCKER_BUF) check lint --error-format=json
|
||||
.PHONY: proto-lint
|
||||
|
||||
proto-check-breaking-docker:
|
||||
@$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master
|
||||
.PHONY: proto-check-breaking-ci
|
||||
|
||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint
|
||||
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
|
||||
@@ -445,7 +432,7 @@ proto-update-deps:
|
||||
## Issue link: https://github.com/confio/ics23/issues/32
|
||||
@sed -i '4ioption go_package = "github.com/confio/ics23/go";' $(CONFIO_TYPES)/proofs.proto
|
||||
|
||||
.PHONY: proto-all proto-gen proto-lint proto-check-breaking proto-update-deps
|
||||
.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
|
||||
|
||||
###############################################################################
|
||||
### Localnet ###
|
||||
|
||||
Reference in New Issue
Block a user