travis-doxygen.sh (rapidjson-1.0.2) | : | travis-doxygen.sh (rapidjson-1.1.0) | ||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
# check for pull-requests | # check for pull-requests | |||
[ "${TRAVIS_PULL_REQUEST}" = "false" ] || \ | [ "${TRAVIS_PULL_REQUEST}" = "false" ] || \ | |||
skip "Not running Doxygen for pull-requests." | skip "Not running Doxygen for pull-requests." | |||
# check for branch name | # check for branch name | |||
[ "${TRAVIS_BRANCH}" = "master" ] || \ | [ "${TRAVIS_BRANCH}" = "master" ] || \ | |||
skip "Running Doxygen only for updates on 'master' branch (current: ${TRA VIS_BRANCH})." | skip "Running Doxygen only for updates on 'master' branch (current: ${TRA VIS_BRANCH})." | |||
# check for job number | # check for job number | |||
[ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] || \ | # [ "${TRAVIS_JOB_NUMBER}" = "${TRAVIS_BUILD_NUMBER}.1" ] || \ | |||
skip "Running Doxygen only on first job of build ${TRAVIS_BUILD_NUMBER} ( | # skip "Running Doxygen only on first job of build ${TRAVIS_BUILD_NUMBER} ( | |||
current: ${TRAVIS_JOB_NUMBER})." | current: ${TRAVIS_JOB_NUMBER})." | |||
# install doxygen binary distribution | # install doxygen binary distribution | |||
doxygen_install() | doxygen_install() | |||
{ | { | |||
wget -O - "${DOXYGEN_URL}" | \ | wget -O - "${DOXYGEN_URL}" | \ | |||
tar xz -C ${TMPDIR-/tmp} ${DOXYGEN_VER}/bin/doxygen | tar xz -C ${TMPDIR-/tmp} ${DOXYGEN_VER}/bin/doxygen | |||
export PATH="${TMPDIR-/tmp}/${DOXYGEN_VER}/bin:$PATH" | export PATH="${TMPDIR-/tmp}/${DOXYGEN_VER}/bin:$PATH" | |||
} | } | |||
doxygen_run() | doxygen_run() | |||
skipping to change at line 69 | skipping to change at line 69 | |||
doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile; | doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile; | |||
doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile.zh-cn; | doxygen ${TRAVIS_BUILD_DIR}/build/doc/Doxyfile.zh-cn; | |||
} | } | |||
gh_pages_prepare() | gh_pages_prepare() | |||
{ | { | |||
cd "${TRAVIS_BUILD_DIR}/build/doc"; | cd "${TRAVIS_BUILD_DIR}/build/doc"; | |||
[ ! -d "html" ] || \ | [ ! -d "html" ] || \ | |||
abort "Doxygen target directory already exists." | abort "Doxygen target directory already exists." | |||
git --version | git --version | |||
git clone --single-branch -b gh-pages "${GITHUB_CLONE}" html | git clone -b gh-pages "${GITHUB_CLONE}" html | |||
cd html | cd html | |||
# setup git config (with defaults) | # setup git config (with defaults) | |||
git config user.name "${GIT_NAME-travis}" | git config user.name "${GIT_NAME-travis}" | |||
git config user.email "${GIT_EMAIL-"travis@localhost"}" | git config user.email "${GIT_EMAIL-"travis@localhost"}" | |||
# clean working dir | # clean working dir | |||
rm -f .git/index | rm -f .git/index | |||
git clean -df | git clean -df | |||
} | } | |||
gh_pages_commit() { | gh_pages_commit() { | |||
cd "${TRAVIS_BUILD_DIR}/build/doc/html"; | cd "${TRAVIS_BUILD_DIR}/build/doc/html"; | |||
echo "rapidjson.org" > CNAME | ||||
git add --all; | git add --all; | |||
git diff-index --quiet HEAD || git commit -m "Automatic doxygen build"; | git diff-index --quiet HEAD || git commit -m "Automatic doxygen build"; | |||
} | } | |||
gh_setup_askpass() { | gh_setup_askpass() { | |||
cat > ${GIT_ASKPASS} <<EOF | cat > ${GIT_ASKPASS} <<EOF | |||
#!/bin/bash | #!/bin/bash | |||
echo | echo | |||
exit 0 | exit 0 | |||
EOF | EOF | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 5 lines changed or added |