fix: fix proto files created as super-user (#13801)
* chore: bump proto-builder * updates * fix root issue Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
@@ -406,38 +406,30 @@ devdoc-update:
|
||||
### Protobuf ###
|
||||
###############################################################################
|
||||
|
||||
protoVer=0.11.0
|
||||
protoVer=0.11.2
|
||||
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
|
||||
containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer)
|
||||
containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer)
|
||||
containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer)
|
||||
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.9.0
|
||||
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
|
||||
|
||||
proto-all: proto-format proto-lint proto-gen
|
||||
|
||||
proto-gen:
|
||||
@echo "Generating Protobuf files"
|
||||
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
|
||||
sh ./scripts/protocgen.sh; fi
|
||||
@$(protoImage) sh ./scripts/protocgen.sh
|
||||
|
||||
proto-swagger-gen:
|
||||
@echo "Generating Protobuf Swagger"
|
||||
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
|
||||
sh ./scripts/protoc-swagger-gen.sh; fi
|
||||
@$(protoImage) sh ./scripts/protoc-swagger-gen.sh
|
||||
|
||||
proto-format:
|
||||
@echo "Formatting Protobuf files"
|
||||
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
|
||||
find ./ -name "*.proto" -exec clang-format -i {} \; ; fi
|
||||
|
||||
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
|
||||
|
||||
proto-lint:
|
||||
@$(DOCKER_BUF) lint --error-format=json
|
||||
@$(protoImage) buf lint --error-format=json
|
||||
|
||||
proto-check-breaking:
|
||||
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
|
||||
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main
|
||||
|
||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.37.0-alpha.2/proto/tendermint
|
||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.37.0-rc1/proto/tendermint
|
||||
|
||||
TM_CRYPTO_TYPES = proto/tendermint/crypto
|
||||
TM_ABCI_TYPES = proto/tendermint/abci
|
||||
@@ -472,6 +464,8 @@ proto-update-deps:
|
||||
@mkdir -p $(TM_P2P)
|
||||
@curl -sSL $(TM_URL)/p2p/types.proto > $(TM_P2P)/types.proto
|
||||
|
||||
$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update
|
||||
|
||||
.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
|
||||
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user