forked from cerc-io/laconicd-deprecated
fix: protogen scripts were not correctly implemented (#1466)
* Delete local copy of third party proto files * Update protocgen script and buf yaml files to mirror cosmos-sdk * Update makefile commands for proto-gen and proto-swagger-gen to correctly use docker * Commit changed .pb.go files after updating the protogen scripts * Adjust grep in proto-tools-installer script to look for correct gogoproto replacement * address reviews - remove unnecessary ignore in buf.yaml and cosmos-sdk download in the protocgen script * remove proto-update-deps from makefile as we don't store local copies of third party protofiles anymore * Add changelog entry * Update protoc-swagger-gen.sh * Remove third party queries from swagger-ui config (for now) * fix integrations tests * fix dead changelog links (markdown-link-check) Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Freddy Caceres
Federico Kunze Küllmer
parent
04bdccd42a
commit
6455785c04
@@ -433,13 +433,11 @@ 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
|
||||
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
|
||||
|
||||
proto-swagger-gen:
|
||||
@echo "Generating Protobuf Swagger"
|
||||
@./scripts/proto-tools-installer.sh
|
||||
@./scripts/protoc-swagger-gen.sh
|
||||
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protoc-swagger-gen.sh
|
||||
|
||||
proto-format:
|
||||
@echo "Formatting Protobuf files"
|
||||
@@ -453,43 +451,7 @@ proto-check-breaking:
|
||||
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
|
||||
|
||||
|
||||
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.12/proto/tendermint
|
||||
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
|
||||
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.43.0
|
||||
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
|
||||
|
||||
TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto
|
||||
TM_ABCI_TYPES = third_party/proto/tendermint/abci
|
||||
TM_TYPES = third_party/proto/tendermint/types
|
||||
|
||||
GOGO_PROTO_TYPES = third_party/proto/gogoproto
|
||||
|
||||
COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
|
||||
|
||||
proto-update-deps:
|
||||
@mkdir -p $(GOGO_PROTO_TYPES)
|
||||
@curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
|
||||
|
||||
@mkdir -p $(COSMOS_PROTO_TYPES)
|
||||
@curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
|
||||
|
||||
## Importing of tendermint protobuf definitions currently requires the
|
||||
## use of `sed` in order to build properly with cosmos-sdk's proto file layout
|
||||
## (which is the standard Buf.build FILE_LAYOUT)
|
||||
## Issue link: https://github.com/tendermint/tendermint/issues/5021
|
||||
@mkdir -p $(TM_ABCI_TYPES)
|
||||
@curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto
|
||||
|
||||
@mkdir -p $(TM_TYPES)
|
||||
@curl -sSL $(TM_URL)/types/types.proto > $(TM_TYPES)/types.proto
|
||||
|
||||
@mkdir -p $(TM_CRYPTO_TYPES)
|
||||
@curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto
|
||||
@curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto
|
||||
|
||||
|
||||
|
||||
.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format 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
|
||||
|
||||
###############################################################################
|
||||
### Localnet ###
|
||||
|
||||
Reference in New Issue
Block a user