Merge pull request #103 from jgallagher/keep-docs-on-released-versions

Keep docs on released versions
This commit is contained in:
John Gallagher 2015-12-16 16:00:01 -05:00
commit 69de98db90
3 changed files with 15 additions and 9 deletions

View File

@ -13,12 +13,3 @@ script:
- cargo test --features trace
- cargo test --features functions
- cargo test --features "backup functions load_extension trace"
- cargo doc --no-deps --features "backup functions load_extension trace"
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
echo '<meta http-equiv=refresh content=0;url=rusqlite/index.html>' > target/doc/index.html &&
sudo pip install ghp-import &&
ghp-import -n target/doc &&
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages

View File

@ -12,3 +12,4 @@ rusqlite contributors (sorted alphabetically)
* [Ben Striegel](https://github.com/bstrie)
* [Andrew Straw](https://github.com/astraw)
* [Ronald Kinard](https://github.com/Furyhunter)
* [maciejkula](https://github.com/maciejkula)

14
publish-ghp-docs.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
git describe --exact-match --tags $(git log -n1 --pretty='%h') >/dev/null 2>&1
if [[ $? != 0 ]]; then
echo "Should not publish tags from an untagged commit!"
exit 1
fi
cd $(git rev-parse --show-toplevel)
rm -rf target/doc/
multirust run nightly cargo doc --no-deps --features "load_extension trace"
echo '<meta http-equiv=refresh content=0;url=rusqlite/index.html>' > target/doc/index.html
ghp-import target/doc
git push origin gh-pages:gh-pages