Skip to content

Commit

Permalink
Taskfile: use buf to generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-perugini committed Oct 18, 2024
1 parent add53b5 commit 365cab9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ tasks:
protoc:docs:
desc: Generate docs for protobuf definitions
cmds:
- '{{ default "protoc" .PROTOC_BINARY }} --doc_out=./docs/rpc --doc_opt=markdown,commands.md --proto_path=rpc ./rpc/cc/arduino/cli/commands/v1/*.proto'
- |
buf generate --template buf.doc.gen.yaml
docs:include-configuration-json-schema:
desc: Copy configuration JSON schema to make it available in documentation
Expand Down
10 changes: 10 additions & 0 deletions buf.doc.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v2
plugins:
# Local plugin used to generate docs
# go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]
- local: protoc-gen-doc
out: ./docs/rpc
opt:
- markdown,commands.md
inputs:
- directory: ./rpc

0 comments on commit 365cab9

Please sign in to comment.