Skip to content

Commit

Permalink
docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jiujiteiro committed Dec 7, 2022
1 parent 8386dc8 commit 2ad232c
Show file tree
Hide file tree
Showing 6 changed files with 38,782 additions and 12 deletions.
23 changes: 14 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ TESTNET_FLAGS ?=
VERSION := $(shell echo $(shell git describe --tags 2>/dev/null ) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
HTTPS_GIT := https://github.com/realiotech/realio-network.git
PROJECT_NAME = realio-network

export GO111MODULE = on

Expand Down Expand Up @@ -120,28 +121,32 @@ endif
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf

containerProtoVer=v0.3
containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer)
containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer)
containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer)
containerProtoFmt=cosmos-sdk-proto-fmt-$(containerProtoVer)
protoVer=v0.7
protoImageName=tendermintdev/sdk-proto-gen:$(protoVer)
containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer)
containerProtoGenAny=$(PROJECT_NAME)-proto-gen-any-$(protoVer)
containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer)
containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer)

proto-all: proto-format proto-lint proto-gen

proto-gen:
@echo "Generating Protobuf files"
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) sh ./scripts/protocgen.sh
@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

proto-swagger-gen:
@echo "Generating Protobuf Swagger"
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) sh ./scripts/protoc-swagger-gen.sh
@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

proto-format:
@echo "Formatting Protobuf files"
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \; ; fi

proto-lint:
@$(DOCKER_BUF) lint --error-format=json
@$(DOCKER_BUF) lint proto --error-format=json

proto-check-breaking:
@$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main
Expand Down
4 changes: 4 additions & 0 deletions buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: v1
directories:
- proto
- third_party/proto
19 changes: 18 additions & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
"version": "1.0.0"
},
"apis": [
{
"url": "./tmp-swagger-gen/realionetwork/asset/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "AssetParams"
}
}
},
{
"url": "./tmp-swagger-gen/realionetwork/mint/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "MintParams"
}
}
},
{
"url": "./tmp-swagger-gen/ethermint/evm/v1/query.swagger.json",
"operationIds": {
Expand All @@ -18,7 +34,8 @@
"url": "./tmp-swagger-gen/ethermint/feemarket/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "FeeMarketParams"
"Params": "FeeMarketParams",
"BaseFee": "EvmBaseFee"
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion client/docs/statik/init.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
package statik

// This just for fixing the error in importing empty github.com/evmos/ethermint/client/docs/statik
// This just for fixing the error in importing empty github.com/cosmos/cosmos-sdk/client/docs/statik
// override ethermint statik by importing it
// nolint
import _ "github.com/evmos/ethermint/client/docs/statik"
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 2ad232c

Please sign in to comment.