Skip to content

Commit

Permalink
Allow deployment when the author was not the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
cyplo committed May 5, 2018
1 parent ed6dad9 commit ea35e4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
9 changes: 4 additions & 5 deletions ci/upload-coverage-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit ea35e4d

Please sign in to comment.