This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push: new 6e54f89 Fixed the building of javadoc/doxygen/pydoc on site2 build (#3639) 6e54f89 is described below commit 6e54f89345af6afa62f604436f9dd05bf6d73955 Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Feb 20 21:32:15 2019 -0800 Fixed the building of javadoc/doxygen/pydoc on site2 build (#3639) --- pulsar-client-cpp/Doxyfile | 2 +- site2/tools/docker-build-site.sh | 2 +- {site/scripts => site2/tools}/doxygen-doc-gen.sh | 7 +++++-- .../tools/generate-api-docs.sh | 17 ++++++++--------- {site/scripts => site2/tools}/javadoc-gen.sh | 9 +++++---- {site/scripts => site2/tools}/publish-website.sh | 0 {site/scripts => site2/tools}/python-doc-gen.sh | 2 +- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/pulsar-client-cpp/Doxyfile b/pulsar-client-cpp/Doxyfile index 2035e0e..3eb42e9 100644 --- a/pulsar-client-cpp/Doxyfile +++ b/pulsar-client-cpp/Doxyfile @@ -77,7 +77,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = ../site/api/cpp +OUTPUT_DIRECTORY = ../generated-site/api/cpp # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and diff --git a/site2/tools/docker-build-site.sh b/site2/tools/docker-build-site.sh index 070ad60..fc70c7e 100755 --- a/site2/tools/docker-build-site.sh +++ b/site2/tools/docker-build-site.sh @@ -44,4 +44,4 @@ CROWDIN_DOCUSAURUS_API_KEY=${CROWDIN_DOCUSAURUS_API_KEY:-UNSET} DOCKER_CMD="docker run -i -e CI_USER=$CI_USER -e CI_GROUP=$CI_GROUP -e CROWDIN_DOCUSAURUS_PROJECT_ID=${CROWDIN_DOCUSAURUS_PROJECT_ID} -e CROWDIN_DOCUSAURUS_API_KEY=${CROWDIN_DOCUSAURUS_API_KEY} -v $ROOT_DIR:/pulsar $IMAGE" -$DOCKER_CMD bash -l -c 'cd /pulsar/site2/website && yarn && yarn write-translations && yarn run crowdin-upload && yarn run crowdin-download && yarn build && node ./scripts/replace.js && rm -rf /pulsar/generated-site/content && mkdir -p /pulsar/generated-site/content && cp -R ./build/pulsar/* /pulsar/generated-site/content' +$DOCKER_CMD bash -l -c '/pulsar/site/tools/generate-api-docs.sh && cd /pulsar/site2/website && yarn && yarn write-translations && yarn run crowdin-upload && yarn run crowdin-download && yarn build && node ./scripts/replace.js && rm -rf /pulsar/generated-site/content && mkdir -p /pulsar/generated-site/content && cp -R ./build/pulsar/* /pulsar/generated-site/content' diff --git a/site/scripts/doxygen-doc-gen.sh b/site2/tools/doxygen-doc-gen.sh similarity index 86% copy from site/scripts/doxygen-doc-gen.sh copy to site2/tools/doxygen-doc-gen.sh index 4d83d20..3925db5 100755 --- a/site/scripts/doxygen-doc-gen.sh +++ b/site2/tools/doxygen-doc-gen.sh @@ -18,15 +18,18 @@ # under the License. # +set -x -e ROOT_DIR=$(git rev-parse --show-toplevel) DOXYGEN=doxygen TMP_DIR=$(mktemp -d) +mkdir -p $ROOT_DIR/generated-site/api/cpp + ( cd $ROOT_DIR/pulsar-client-cpp $DOXYGEN Doxyfile ) -mv api/cpp $TMP_DIR -mv $TMP_DIR/cpp/html api/cpp +mv $ROOT_DIR/generated-site/api/cpp $TMP_DIR +mv $TMP_DIR/cpp/html $ROOT_DIR/generated-site/api/cpp diff --git a/site/scripts/doxygen-doc-gen.sh b/site2/tools/generate-api-docs.sh similarity index 81% rename from site/scripts/doxygen-doc-gen.sh rename to site2/tools/generate-api-docs.sh index 4d83d20..668dbbb 100755 --- a/site/scripts/doxygen-doc-gen.sh +++ b/site2/tools/generate-api-docs.sh @@ -18,15 +18,14 @@ # under the License. # +set -x -e -ROOT_DIR=$(git rev-parse --show-toplevel) -DOXYGEN=doxygen -TMP_DIR=$(mktemp -d) +SCRIPT_DIR=`dirname "$0"` -( - cd $ROOT_DIR/pulsar-client-cpp - $DOXYGEN Doxyfile -) +cd $SCRIPT_DIR -mv api/cpp $TMP_DIR -mv $TMP_DIR/cpp/html api/cpp +./doxygen-doc-gen.sh + +./javadoc-gen.sh + +./python-doc-gen.sh diff --git a/site/scripts/javadoc-gen.sh b/site2/tools/javadoc-gen.sh similarity index 91% rename from site/scripts/javadoc-gen.sh rename to site2/tools/javadoc-gen.sh index 851088c..5a9e8d1 100755 --- a/site/scripts/javadoc-gen.sh +++ b/site2/tools/javadoc-gen.sh @@ -20,6 +20,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel) +DEST_DIR=$ROOT_DIR/generated-site JDK_COMMON_PKGS=java.lang:java.util:java.util.concurrent:java.nio:java.net:java.io ( @@ -31,12 +32,12 @@ JDK_COMMON_PKGS=java.lang:java.util:java.util.concurrent:java.nio:java.net:java. -windowtitle "Pulsar Client Java API" \ -doctitle "Pulsar Client Java API" \ -overview site/javadoc/client.html \ - -d site/api/client \ + -d $DEST_DIR/api/client \ -subpackages org.apache.pulsar.client.api \ -noqualifier $JDK_COMMON_PKGS \ -notimestamp \ -Xdoclint:none \ - `find pulsar-client/src/main/java/org/apache/pulsar/client/api -name *.java` + `find pulsar-client-api/src/main/java/org/apache/pulsar/client/api -name *.java` # Java admin javadoc \ @@ -44,7 +45,7 @@ JDK_COMMON_PKGS=java.lang:java.util:java.util.concurrent:java.nio:java.net:java. -windowtitle "Pulsar Admin Java API" \ -doctitle "Pulsar Admin Java API" \ -overview site/javadoc/admin.html \ - -d site/api/admin \ + -d $DEST_DIR/api/admin \ -noqualifier $JDK_COMMON_PKGS \ -notimestamp \ -Xdoclint:none \ @@ -57,7 +58,7 @@ JDK_COMMON_PKGS=java.lang:java.util:java.util.concurrent:java.nio:java.net:java. -windowtitle "Pulsar Functions Java SDK" \ -doctitle "Pulsar Functions Java SDK" \ -overview site/javadoc/pulsar-functions.html \ - -d site/api/pulsar-functions \ + -d $DEST_DIR/api/pulsar-functions \ -noqualifier $JDK_COMMON_PKGS \ -notimestamp \ -Xdoclint:none \ diff --git a/site/scripts/publish-website.sh b/site2/tools/publish-website.sh similarity index 100% rename from site/scripts/publish-website.sh rename to site2/tools/publish-website.sh diff --git a/site/scripts/python-doc-gen.sh b/site2/tools/python-doc-gen.sh similarity index 96% rename from site/scripts/python-doc-gen.sh rename to site2/tools/python-doc-gen.sh index ea745b7..d86648e 100755 --- a/site/scripts/python-doc-gen.sh +++ b/site2/tools/python-doc-gen.sh @@ -26,7 +26,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # so that Pdoc can import the module pip install pulsar-client -DESTINATION=$ROOT_DIR/site/api/python +DESTINATION=$ROOT_DIR/generated-site/api/python rm -fr $DESTINATION/{index.html,functions,pulsar} PYTHONPATH=$ROOT_DIR/pulsar-client-cpp/python pdoc pulsar \ --html \