Skip to content

Commit

Permalink
feat: add protoc-doc-gen.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Dec 1, 2022
1 parent 66c152b commit 4b381cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ proto-gen:
@echo "Generating Protobuf files"
@sh ./proto/scripts/protocgen.sh

proto-doc:
@echo "Generating Protoc docs"
@sh ./proto/scripts/protoc-doc-gen.sh

proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@sh ./proto/scripts/protoc-swagger-gen.sh
Expand Down
9 changes: 9 additions & 0 deletions proto/scripts/protoc-doc-gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

# command to generate docs using protoc-gen-doc
protoc \
-I "proto" \
-I "third_party/proto" \
--doc_out=./docs/proto \
--doc_opt=./docs/proto/protodoc-markdown.tmpl,proto-docs.md \
$(find "proto" -maxdepth 5 -name '*.proto')
8 changes: 0 additions & 8 deletions proto/scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \

done

# command to generate docs using protoc-gen-doc
protoc \
-I "proto" \
-I "third_party/proto" \
--doc_out=./docs/proto \
--doc_opt=./docs/proto/protodoc-markdown.tmpl,proto-docs.md \
$(find "proto" -maxdepth 5 -name '*.proto')

# move proto files to the right places
cp -r github.com/cosmos/gaia/x/* x/
rm -rf github.com

0 comments on commit 4b381cf

Please sign in to comment.