Skip to content

Commit 563df6e

Browse files
committed
Add doc rules
1 parent 8214f89 commit 563df6e

37 files changed

+1136
-3
lines changed

.bazelci/presubmit.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,32 @@ tasks:
8080
- make cpp_cpp_proto_library_example
8181
- make cpp_cpp_grpc_library_example
8282

83+
doc_ubuntu2204_examples:
84+
name: doc examples
85+
platform: ubuntu2204
86+
environment:
87+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17"
88+
shell_commands:
89+
- set -x
90+
- make doc_doc_docbook_compile_example
91+
- make doc_doc_html_compile_example
92+
- make doc_doc_json_compile_example
93+
- make doc_doc_markdown_compile_example
94+
- make doc_doc_template_compile_example
95+
96+
doc_macos_examples:
97+
name: doc examples
98+
platform: macos
99+
environment:
100+
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17"
101+
shell_commands:
102+
- set -x
103+
- make doc_doc_docbook_compile_example
104+
- make doc_doc_html_compile_example
105+
- make doc_doc_json_compile_example
106+
- make doc_doc_markdown_compile_example
107+
- make doc_doc_template_compile_example
108+
83109
go_ubuntu2204_examples:
84110
name: go examples
85111
platform: ubuntu2204

.bazelignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ examples/cpp/cpp_grpc_compile
99
examples/cpp/cpp_proto_library
1010
examples/cpp/cpp_grpc_library
1111

12+
examples/doc/doc_docbook_compile
13+
examples/doc/doc_html_compile
14+
examples/doc/doc_json_compile
15+
examples/doc/doc_markdown_compile
16+
examples/doc/doc_template_compile
17+
1218
examples/go/go_proto_compile
1319
examples/go/go_grpc_compile
1420
examples/go/go_proto_library

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ local_path_override(
4141
path = "modules/cpp",
4242
)
4343

44+
# Documentation
45+
bazel_dep(name = "rules_proto_grpc_doc", version = "0.0.0.rpg.version.placeholder")
46+
local_path_override(
47+
module_name = "rules_proto_grpc_doc",
48+
path = "modules/doc",
49+
)
50+
4451
# Go
4552
bazel_dep(name = "rules_proto_grpc_go", version = "0.0.0.rpg.version.placeholder")
4653
local_path_override(

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ Full documentation for the current and previous versions [can be found here](htt
5757
| [C++](https://rules-proto-grpc.com/en/latest/lang/cpp.html) | [cpp_grpc_compile](https://rules-proto-grpc.com/en/latest/lang/cpp.html#cpp-grpc-compile) | Generates C++ protobuf and gRPC ``.h`` & ``.cc`` files ([example](/examples/cpp/cpp_grpc_compile)) |
5858
| [C++](https://rules-proto-grpc.com/en/latest/lang/cpp.html) | [cpp_proto_library](https://rules-proto-grpc.com/en/latest/lang/cpp.html#cpp-proto-library) | Generates a C++ protobuf library using ``cc_library``, with dependencies linked ([example](/examples/cpp/cpp_proto_library)) |
5959
| [C++](https://rules-proto-grpc.com/en/latest/lang/cpp.html) | [cpp_grpc_library](https://rules-proto-grpc.com/en/latest/lang/cpp.html#cpp-grpc-library) | Generates a C++ protobuf and gRPC library using ``cc_library``, with dependencies linked ([example](/examples/cpp/cpp_grpc_library)) |
60+
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_docbook_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-docbook-compile) | Generates DocBook ``.xml`` documentation file ([example](/examples/doc/doc_docbook_compile)) |
61+
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_html_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-html-compile) | Generates ``.html`` documentation file ([example](/examples/doc/doc_html_compile)) |
62+
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_json_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-json-compile) | Generates ``.json`` documentation file ([example](/examples/doc/doc_json_compile)) |
63+
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_markdown_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-markdown-compile) | Generates Markdown ``.md`` documentation file ([example](/examples/doc/doc_markdown_compile)) |
64+
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_template_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-template-compile) | Generates documentation file using Go template file ([example](/examples/doc/doc_template_compile)) |
6065
| [Go](https://rules-proto-grpc.com/en/latest/lang/go.html) | [go_proto_compile](https://rules-proto-grpc.com/en/latest/lang/go.html#go-proto-compile) | Generates Go protobuf ``.go`` files ([example](/examples/go/go_proto_compile)) |
6166
| [Go](https://rules-proto-grpc.com/en/latest/lang/go.html) | [go_grpc_compile](https://rules-proto-grpc.com/en/latest/lang/go.html#go-grpc-compile) | Generates Go protobuf and gRPC ``.go`` files ([example](/examples/go/go_grpc_compile)) |
6267
| [Go](https://rules-proto-grpc.com/en/latest/lang/go.html) | [go_proto_library](https://rules-proto-grpc.com/en/latest/lang/go.html#go-proto-library) | Generates a Go protobuf library using ``go_library`` from ``rules_go`` ([example](/examples/go/go_proto_library)) |

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Supported Languages and Tools
209209

210210
lang/c
211211
lang/cpp
212+
lang/doc
212213
lang/go
213214
lang/grpc_gateway
214215
lang/python

0 commit comments

Comments
 (0)