From 56fbda967073c387ae5105c7078472eab0db4c27 Mon Sep 17 00:00:00 2001 From: Pat Cavit Date: Thu, 4 Aug 2016 11:24:32 -0700 Subject: [PATCH] Move travis-scripts to be build-server only (#1215) * Move travis-scripts to be build-server only * Fix up conditional logic --- .travis.yml | 13 +++++++++++-- package.json | 1 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6b34207..bb2c286c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,20 @@ cache: directories: - node_modules +# Custom install step so the travis scripts don't need to be in package.json +install: + - npm install + - npm install @alrra/travis-scripts@^3.0.1 + +# After a successful build create bundles & commit back to the repo after_success: - | - # Only want to do this on commits to $BRANCH - [ "$TRAVIS_PULL_REQUEST" == "true" -o "$TRAVIS_BRANCH" != "$BRANCH" ] && (echo Artifacts only built on $BRANCH; exit 0) + # Only want to commit things on commits to $BRANCH + if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] || [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then + echo "Artifacts only built on $BRANCH" + exit 0 + fi # Set up SSH environment $(npm bin)/set-up-ssh --key "$encrypted_8b86e0359d64_key" \ diff --git a/package.json b/package.json index 708ae75d..14d8f92a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "cover": "istanbul cover --print both ospec/bin/ospec" }, "devDependencies": { - "@alrra/travis-scripts": "^3.0.1", "eslint": "^2.10.2", "istanbul": "^0.4.3" },