From ed6714f7fcd8cf2142dede17203fbed965d077cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Sat, 13 Jan 2018 21:04:15 +0900 Subject: [PATCH] Drop travis-cargo --- .travis.yml | 11 ++++------- .travis/docs.sh | 34 ++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100755 .travis/docs.sh diff --git a/.travis.yml b/.travis.yml index 7e30494f9e9..1721432669d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,21 +19,18 @@ before_install: - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules - git submodule update --init --recursive -before_script: -- | - pip install 'travis-cargo<0.2' --user && - export PATH=$HOME/.local/bin:$PATH script: - | export TRAVIS_CARGO_NIGHTLY_FEATURE="" && cargo build --verbose --all && - cargo test --verbose --all && - travis-cargo doc + cargo test --all after_success: - bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh) - cargo tarpaulin --out Xml - bash <(curl -s https://codecov.io/bash) -- travis-cargo doc-upload +- '[ $TRAVIS_PULL_REQUEST = false ] && + [ "$TRAVIS_BRANCH" == "master" ] && + ./.travis/docs.sh' notifications: email: on_success: never diff --git a/.travis/docs.sh b/.travis/docs.sh new file mode 100755 index 00000000000..509796ef3b1 --- /dev/null +++ b/.travis/docs.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Copied from https://github.com/hyperium/hyper/blob/master/.travis/docs.sh +# which is MIT-licensed. + +set -o errexit + +shopt -s globstar + +cargo doc + +git clone --branch gh-pages "https://$GH_TOKEN@github.com/${TRAVIS_REPO_SLUG}.git" deploy_docs > /dev/null 2>&1 +cd deploy_docs + + +git config user.name "강동윤" +git config user.email "kdy1@outlook.kr" + +if [ "$TRAVIS_TAG" = "" ]; then + rm -rf master + mv ../target/doc ./master + echo "" > ./master/index.html +fi + + +git add -A . +git commit -m "rebuild pages at ${TRAVIS_COMMIT}" + +echo +echo "Pushing docs..." +git push --quiet origin gh-pages > /dev/null 2>&1 +echo +echo "Docs published." +echo \ No newline at end of file diff --git a/README.md b/README.md index 700fb40431a..a1825b1a139 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # spdy web compiler -[![Build Status](https://travis-ci.org/kdy1/swc.svg?branch=ecmascript)](https://travis-ci.org/kdy1/swc) +[![Build Status](https://travis-ci.org/kdy1/swc.svg?branch=master)](https://travis-ci.org/kdy1/swc) [![codecov](https://codecov.io/gh/kdy1/swc/branch/master/graph/badge.svg)](https://codecov.io/gh/kdy1/swc) -----