Commit adcfb1d4 authored by André Anjos's avatar André Anjos 💬
Browse files

Use external script to update sphinx documentation on server

parent 87203206
......@@ -20,7 +20,6 @@ script:
- ./bin/coverage run --source=bob.extension ./bin/nosetests -sv
- ./bin/sphinx-build -b doctest doc sphinx
- ./bin/sphinx-build -b html doc sphinx
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then echo -e "repo=${TRAVIS_REPO_SLUG}\nbranch=${TRAVIS_BRANCH}\ntag=${TRAVIS_TAG}\nbuild=${TRAVIS_JOB_NUMBER}\ncommit=${TRAVIS_COMMIT}\nos=${TRAVIS_OS_NAME}" > sphinx/.travis.info; tar cfz $(basename ${TRAVIS_REPO_SLUG})-${TRAVIS_COMMIT}.tar.gz sphinx; fi
after_success:
- coveralls
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then curl -k -T $(basename ${TRAVIS_REPO_SLUG})-${TRAVIS_COMMIT}.tar.gz https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/docs-upload/; fi
- ./scripts/upload-sphinx.sh
#!/usr/bin/env bash
# some checks
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
echo "This is a pull request - not updating documentation";
exit 0
fi
pyver=$(python -c 'import sys; print "%d.%d" % sys.version_info[:2]')
pyver_req="2.7"
if [ "${pyver}" != "${pyver_req}" ]; then
echo "Not building against Python ${pyver_req} - not uploading documentation";
exit 0
fi
info=sphinx/.travis.info
codename=$(basename ${TRAVIS_REPO_SLUG})-${TRAVIS_COMMIT}
server=https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/docs-upload/
# annotate
echo -e "repo=${TRAVIS_REPO_SLUG}\n" >> ${info}
echo -e "branch=${TRAVIS_BRANCH}\n" >> ${info}
echo -e "tag=${TRAVIS_TAG}\n" >> ${info}
echo -e "build=${TRAVIS_JOB_NUMBER}\n" >> ${info}
echo -e "commit=${TRAVIS_COMMIT}\n" >> ${info}
echo -e "os=${TRAVIS_OS_NAME}\n" >> ${info}
# compress
tar cfj ${codename}.tar.bz2 sphinx
# send
curl -k -T ${codename}.tar.bz2 ${server}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment