Skip to content

Commit

Permalink
Cleans up travis tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
rjz committed Jun 17, 2015
1 parent 27319d0 commit 6631f86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 9 additions & 6 deletions tasks/travis_after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Override main branch
# ONLY changes to this branch will be reported back to coveralls after a
# successful test run.
MASTER_BRANCH=master

GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
[[ "$TRAVIS_PULL_REQUEST" == 'false' && "$TRAVIS_BRANCH" == $MASTER_BRANCH ]] || {
echo "Skipping post-build tasks for pull request"
exit 0;
}

[ "$GIT_BRANCH" == 'master' ] || exit 0;

npm run pages
cat "$DIR/../coverage/lcov.info" | "$DIR/../node_modules/.bin/coveralls"
cat coverage/lcov.info | coveralls

5 changes: 2 additions & 3 deletions tasks/travis_before_script.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

#!/bin/bash

set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Add node_modules binaries to the path
export PATH=$PATH:$PWD/node_modules/.bin

# Audit project dependencies
npm shrinkwrap && ./tasks/audit.sh

0 comments on commit 6631f86

Please sign in to comment.