From ea35e4da143c8d7dc5867a3e2d44868b5d292bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 5 May 2018 20:14:51 +0100 Subject: [PATCH] Allow deployment when the author was not the bot --- .travis.yml | 9 +++++++-- ci/upload-coverage-data.sh | 9 ++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf93d09..659cdef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,12 @@ script: - cargo doc - cargo package -cache: cargo +cache: + directories: + - target/debug + - target/release + - target/kcov + - /home/travis/.cargo before_deploy: - git checkout $TRAVIS_BRANCH @@ -30,7 +35,7 @@ deploy: branch: master condition: "$TRAVIS_RUST_VERSION = stable" condition: "-z $TRAVIS_TAG" - condition: "`git log -n 1 --pretty='%an'` =~ 'Travis'" + condition: "! (`git log -n 1 --pretty='%an'` =~ 'Travis')" skip_cleanup: true diff --git a/ci/upload-coverage-data.sh b/ci/upload-coverage-data.sh index fcfc602..017f4fb 100755 --- a/ci/upload-coverage-data.sh +++ b/ci/upload-coverage-data.sh @@ -3,8 +3,8 @@ set -e pushd `pwd` -mkdir -p target/coverage -cd target/coverage +mkdir -p target/kcov +cd target/kcov wget -c https://github.com/SimonKagstrom/kcov/archive/master.tar.gz tar xzf master.tar.gz cd kcov-master @@ -16,9 +16,8 @@ make install DESTDIR=../../kcov-build popd for file in `find -wholename "./target/debug/genpass-*[^\.d]"`; do echo "processing $file" - mkdir -p "target/cov/$(basename $file)" - ./target/coverage/kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file" + mkdir -p "target/coverage-data/$(basename $file)" + ./target/kcov/kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/coverage-data/$(basename $file)" "$file" done -cd target/cov/ bash <(curl -s https://codecov.io/bash) echo "Uploaded code coverage"