From 076f74e8e3cc21bb14f44c2b3c9786dc956b34a4 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Fri, 10 Apr 2015 11:40:22 +0200 Subject: [PATCH] Update to new Doc upload --- .travis.yml | 8 ++----- .travis/id_rsa.enc | Bin 0 -> 3248 bytes .travis/publish_doc.sh | 28 ----------------------- .travis/travis-doc-upload.cfg | 4 ++++ .travis/travis-doc-upload.sh | 42 ++++++++++++++++++++++++++++++++++ README.md | 2 +- 6 files changed, 49 insertions(+), 35 deletions(-) create mode 100644 .travis/id_rsa.enc delete mode 100755 .travis/publish_doc.sh create mode 100644 .travis/travis-doc-upload.cfg create mode 100755 .travis/travis-doc-upload.sh diff --git a/.travis.yml b/.travis.yml index 1368865c..593ea650 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,15 +11,11 @@ notifications: on_success: never on_failure: always -env: - global: - - secure: "VeXvD0tLJyu38t87p8AAztSQVBxsCE1y016l/Nc44203V/RUxj4tz5ifaZcKziPqFHK2ITs2T6fBE1uu404zMVwA0W0J8vmG6+xDoJJLsbwKp4W3SlAI+oIEmFSTIxgzAB7hio17VPDmAqKbnbhbmbP+U94ygoztRNN3ObCZ8yo=" - script: - cargo build - cargo test - - cargo doc --no-deps + - cargo doc - rustdoc --test README.md -L target after_success: - - .travis/publish_doc.sh + - .travis/travis-doc-upload.sh diff --git a/.travis/id_rsa.enc b/.travis/id_rsa.enc new file mode 100644 index 0000000000000000000000000000000000000000..5431e4137fbbbef8f25bb46e7985a0c84780245a GIT binary patch literal 3248 zcmV;h3{Ug5@tI6Vv=KnmVh^$bGb%Ycj2zkWNNov%jmVtOih@+5ti7W9)i{MK+?_hE zrTy=8ibx(VGnV|)Hb4H-n=Im5ZfQO+V!F_Ac}liro7|T+2(piP)VWGFT08Za91jiX z1&^aAFXYW5YMUN6jynBAVwWO=MltmrypZq|MVO|f&91=P7tXP>3^D`T+dV{!)e~w$ ztW%sMt+KW7thfbf%LJU3^r%nI6{wf+*wdDIAqf^G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%$A65qrWJ3x%-K4lXMH5G6%Hlc#oOkv8BWg6L0cd}0I%lBQOoV(}6p zN47`?ZzF2EtuLNna$!@?AhTVq-r_0`kiz@YzRNe4^8s&N(PixH3s{12{^aYt?XKrA z)5J?eU{X|Pc;4lLccY<`R}tZxLXE#Bz-$A&4+%lxlCJyb_H8l^1<_m=|2zr0hHqHF z&|FUC^qX$W-DVJF-4wqTZUR~RpACqQv7YK6#v+^D;eWG?%?gmevnXYpHm|m|N|Gzl zC^KM4GC;=@3+f|xa-U!y;*sSG5?;ScRS42l6dDYBnfZAs|Cw=7g8tOD-dm^7Gtd=; zd|yHtkPz%5t?`9D^5i(rp{{dv!zBQ*W>6FxagX%bz`rZ3-N}dmr@ti;wSn%XKN`x{ z{OTWp>hr9eHDQU{?>ITTdb5| zBO|c1n9{QYx5L_Nh9#@scLvF$F?>(7>K}P> z!NAuXLcUBbpnu={iSQy4J0PrU*9zH77Mse1TZR7;j=PT;yPNYl{}|&=n9XJomyBGheXFRjowK_p^Je4shiBCk#~EN-3cehVKL`t&$ael{fKaeb}e z5XHh|Wm+EVlrg^7-$UTO)$XhdtipqnEMV+eA%8~B{`T%H(>hvs)ycYa9M=*1)a6uN zrKo@)fPLVhSb`ECX-z?r*`+S%hZFMS<(B^FjqNz_1t=MouJJtJIojy-TCKY1%RBoG zpl#@kympAhM}KT}Yd?1!@92*6OQv}NAodS7MDhpo9aviUfFh{We`rvD?^_);-z>PQ z5_kLpc05!BWj2A$>SzWp=ohh>M`Je0Dj`L~>|gFO*Yo4Qql;hj9k3zi|&==RcKc i8YL@Voq9w1y1PH4lO;k6LOSWLIT&t /dev/null - - cd gh-pages - git config user.email "travis@travis-ci.org" - git config user.name "travis-ci" - - git rm -rf . > /dev/null - cp -Rf $TRAVIS_BUILD_DIR/target/doc/* . - - git reset HEAD -- index.html > /dev/null - git checkout -- index.html > /dev/null - - git add -f . - git commit -m "Auto doc upload from travis" - git push -fq origin gh-pages > /dev/null - - echo "Published documentation" -fi diff --git a/.travis/travis-doc-upload.cfg b/.travis/travis-doc-upload.cfg new file mode 100644 index 00000000..4ce80a34 --- /dev/null +++ b/.travis/travis-doc-upload.cfg @@ -0,0 +1,4 @@ +PROJECT_NAME=zip-rs +DOCS_REPO=mvdnes/rust-docs.git +SSH_KEY_TRAVIS_ID=70a3dd61d838 +DOC_RUST_VERSION=1.0.0-beta diff --git a/.travis/travis-doc-upload.sh b/.travis/travis-doc-upload.sh new file mode 100755 index 00000000..12c67ccd --- /dev/null +++ b/.travis/travis-doc-upload.sh @@ -0,0 +1,42 @@ +#!/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" diff --git a/README.md b/README.md index 42b73822..bfde9a5f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ zip-rs [![Build Status](https://travis-ci.org/mvdnes/zip-rs.svg?branch=master)](https://travis-ci.org/mvdnes/zip-rs) -[Documentation](http://mvdnes.github.io/zip-rs/) +[Documentation](http://mvdnes.github.io/rust-docs/zip-rs/zip/index.html) A zip library for rust wich supports reading and writing of simple ZIP files.