Skip to content

Commit

Permalink
Protobuf documentation update (apache#1686)
Browse files Browse the repository at this point in the history
* use go get for protoc-gen-doc

* modify Dockerfile for website build
  • Loading branch information
lucperkins authored and merlimat committed Apr 30, 2018
1 parent 1cac0ba commit 31131c2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
9 changes: 3 additions & 6 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get install -y maven tig g++ cmake libssl-dev libcurl4-openssl-dev \
liblog4cxx-dev libprotobuf-dev libboost-all-dev google-mock libgtest-dev \
libjsoncpp-dev libxml2-utils protobuf-compiler wget \
curl doxygen openjdk-8-jdk-headless clang-format-5.0 \
gnupg2
gnupg2 golang-1.10-go

# Compile and install gtest
RUN cd /usr/src/gtest && cmake . && make && cp libgtest.a /usr/lib
Expand All @@ -54,11 +54,8 @@ RUN rvm install 2.4.1
RUN wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
RUN pip install pdoc

# Protogen doc generator
RUN wget https://github.com/pseudomuto/protoc-gen-doc/releases/download/v1.0.0-alpha/protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz && \
tar xvfz protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz && \
cp protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1/protoc-gen-doc /usr/local/bin && \
rm protoc-gen-doc-1.0.0-alpha.linux-amd64.go1.8.1.tar.gz
# Install Protobuf doc generator
RUN go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

# Build the patched protoc
RUN git clone https://github.com/google/protobuf.git /pulsar/protobuf && \
Expand Down
1 change: 0 additions & 1 deletion site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ generated/
_data/config/*.bak
_data/admin-rest-api-swagger.json
_data/protobuf.json
scripts/protoc-gen-doc
scripts/doxygen
scripts/htmltest-*
6 changes: 1 addition & 5 deletions site/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ protobuf_doc_gen:
scripts/protobuf-doc-gen.sh

protobuf_setup:
rm -rf protoc-gen-doc scripts/protoc-gen-doc
git clone https://github.com/pseudomuto/protoc-gen-doc
rm -rf protoc-gen-doc/.git
mv protoc-gen-doc scripts
(cd scripts/protoc-gen-doc && PROTOBUF_PREFIX=$(shell brew --prefix protobuf) qmake && make)
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

api_docs: javadoc python_doc_gen cpp_doc_gen

Expand Down
2 changes: 1 addition & 1 deletion site/scripts/protobuf-doc-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
PROTO_FILE=pulsar-common/src/main/proto/PulsarApi.proto

(
cd $(git rev-parse --show-toplevel)
cd $ROOT_DIR
protoc --doc_out=json,protobuf.json:site/_data/ $PROTO_FILE
)

0 comments on commit 31131c2

Please sign in to comment.