sfizz/.travis/update_dox.sh

20 lines
806 B
Bash
Raw Normal View History

#!/bin/bash
2019-12-22 23:17:27 +01:00
set -x # No fail, we need to go back to the original branch at the end
2020-02-02 14:43:39 +01:00
. .travis/environment.sh
# Build documentation only from Linux x86_64 builds
2020-02-11 16:23:07 +01:00
if [[ ${TRAVIS_CPU_ARCH} != "amd64" || ${TRAVIS_OS_NAME} != "linux" || "${CROSS_COMPILE}" != "" || ${TRAVIS_TAG} == "" ]]; then
exit 0
fi
doxygen Doxyfile
git fetch --depth=1 https://github.com/${TRAVIS_REPO_SLUG}.git refs/heads/gh-pages:refs/remotes/origin/gh-pages
git checkout origin/gh-pages
git checkout -b gh-pages
2020-02-18 01:47:13 +01:00
mv _api api/${TRAVIS_TAG}
git add api/${TRAVIS_TAG} && git commit -m "Release ${TRAVIS_TAG} (Travis build: ${TRAVIS_BUILD_NUMBER})"
git remote add origin-pages https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git > /dev/null 2>&1
git push --quiet --set-upstream origin-pages gh-pages
2019-12-22 23:17:27 +01:00
git checkout ${TRAVIS_BRANCH}