From f1351725f8eb325b24a9c0bcd3592c10df417eeb Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Mon, 13 Apr 2015 10:45:57 +0200 Subject: [PATCH] Use rust-docs doc upload script --- .travis.yml | 2 +- .travis/travis-doc-upload.sh | 42 ------------------------------------ 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100755 .travis/travis-doc-upload.sh diff --git a/.travis.yml b/.travis.yml index 593ea650..b1198383 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ script: - rustdoc --test README.md -L target after_success: - - .travis/travis-doc-upload.sh + - curl https://mvdnes.github.io/rust-docs/travis-doc-upload.sh | sh diff --git a/.travis/travis-doc-upload.sh b/.travis/travis-doc-upload.sh deleted file mode 100755 index 12c67ccd..00000000 --- a/.travis/travis-doc-upload.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# License: CC0 1.0 Universal -# https://creativecommons.org/publicdomain/zero/1.0/legalcode - -set -e - -SCRIPT_PATH=.travis - -. $SCRIPT_PATH/travis-doc-upload.cfg - -[ "$TRAVIS_BRANCH" = master ] - -[ "$TRAVIS_PULL_REQUEST" = false ] - -[ "$TRAVIS_RUST_VERSION" = "$DOC_RUST_VERSION" ] - -echo "Publishing docs..." - -eval key=\$encrypted_${SSH_KEY_TRAVIS_ID}_key -eval iv=\$encrypted_${SSH_KEY_TRAVIS_ID}_iv - -mkdir -p ~/.ssh -openssl aes-256-cbc -K $key -iv $iv -in $SCRIPT_PATH/id_rsa.enc -out ~/.ssh/id_rsa -d -chmod 600 ~/.ssh/id_rsa - -git clone --branch gh-pages git@github.com:$DOCS_REPO deploy_docs - -cd deploy_docs -git config user.name "doc upload bot" -git config user.email "nobody@example.com" -rm -rf $PROJECT_NAME -mv ../target/doc $PROJECT_NAME -git add -A $PROJECT_NAME -git commit -qm "doc upload for $PROJECT_NAME ($TRAVIS_REPO_SLUG)" - -for i in {0..5}; do - git push -q origin gh-pages && break # redo when push fails - git pull -r || break # give up if rebase fails -done - -echo "Doc upload completed"