From f8d757e29b7528bc73138e076f227d3c70fbbdf6 Mon Sep 17 00:00:00 2001 From: Jeff Wang Date: Fri, 31 Aug 2018 15:39:17 -0700 Subject: [PATCH] Develop doc (#50) * update gen_doc_lib * Update the script to make it simpler * update submodule --- .travis.yml | 7 +++---- external/Paddle | 2 +- scripts/build_doc_lib_lite.sh | 27 --------------------------- scripts/build_doc_lib_lite2.sh | 23 ----------------------- scripts/deploy_docs.sh | 11 ++++++++--- 5 files changed, 12 insertions(+), 58 deletions(-) delete mode 100755 scripts/build_doc_lib_lite.sh delete mode 100755 scripts/build_doc_lib_lite2.sh diff --git a/.travis.yml b/.travis.yml index ab0101fbb..80180d4ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,6 @@ addons: - python - python-pip - python2.7-dev - - golang ssh_known_hosts: 13.229.163.131 before_install: - sudo pip install pylint pytest astroid isort @@ -36,13 +35,13 @@ before_install: script: - | - if [ $JOB == "doc" ]; then scripts/deploy_docs.sh + if [ $JOB == "doc" ]; then scripts/deploy_docs.sh full fi - if [ $JOB == "lite_lib" ]; then scripts/build_doc_lib_lite.sh + if [ $JOB == "lite_lib" ]; then scripts/deploy_docs.sh pybind fi - if [ $JOB == "lite_lib2" ]; then scripts/build_doc_lib_lite2.sh + if [ $JOB == "lite_lib2" ]; then scripts/deploy_docs.sh proto fi if [ $JOB == "en_external_doc" ]; then scripts/deploy_en_external_docs.sh diff --git a/external/Paddle b/external/Paddle index 79c65d166..d4d71dce0 160000 --- a/external/Paddle +++ b/external/Paddle @@ -1 +1 @@ -Subproject commit 79c65d16626e690e4d1c40063bdabf8eed5ad2a7 +Subproject commit d4d71dce04dcd2a41964e6067be18f544cff3767 diff --git a/scripts/build_doc_lib_lite.sh b/scripts/build_doc_lib_lite.sh deleted file mode 100755 index 561667587..000000000 --- a/scripts/build_doc_lib_lite.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -echo "1. Setup submodules" -git submodule update --init --recursive - -echo "2. Build Paddle library" -cd external/Paddle -git branch -paddle/scripts/paddle_docker_build.sh gen_doc_lib_lite -cd ../.. - -exit_code=0 - diff --git a/scripts/build_doc_lib_lite2.sh b/scripts/build_doc_lib_lite2.sh deleted file mode 100755 index f52982037..000000000 --- a/scripts/build_doc_lib_lite2.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -echo "Build Paddle library lite2" -cd external/Paddle -git branch -paddle/scripts/paddle_docker_build.sh gen_doc_lib_lite2 -cd ../.. - -exit_code=0 diff --git a/scripts/deploy_docs.sh b/scripts/deploy_docs.sh index 768fc7e04..31132552a 100755 --- a/scripts/deploy_docs.sh +++ b/scripts/deploy_docs.sh @@ -26,16 +26,21 @@ elif [[ "$TRAVIS_BRANCH" == "develop" || "$TRAVIS_BRANCH" =~ ^v|release/[[:dig PPO_SCRIPT_BRANCH=master else # Early exit, this branch doesn't require documentation build - echo "This branch doesn't require documentation build" + echo "This branch doesn't require documentation build"; exit $exit_code; fi -echo "Build Paddle library. This step is needed to compile Paddle API documents" +echo "Build Paddle library $1. This step is needed to compile Paddle API documents" cd external/Paddle git branch -paddle/scripts/paddle_docker_build.sh gen_doc_lib +paddle/scripts/paddle_docker_build.sh gen_doc_lib $1 cd ../.. +if [[ "$1" == "pybind" || "$1" == "proto" ]]; then + echo "Finish building lite library"; + exit $exit_code; +fi + export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/$PPO_SCRIPT_BRANCH/scripts/deploy/deploy_docs.sh echo "Deploy under docker environment" -- GitLab