From c7913f20a49fdad707a37c507479791544a08e0b Mon Sep 17 00:00:00 2001 From: Pat Cavit Date: Fri, 13 Jan 2017 20:34:44 -0800 Subject: [PATCH] refactor: invert travis check, early-out blows up Not running within a script, so `exit 0` stops all processing which is **NOT HELPFUL**. --- .travis.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index ff204f5f..45cc0faf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,21 +25,20 @@ before_script: npm run build after_success: - | - # Only want to commit things on $BRANCH - if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] || [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then - echo "Artifacts only committed on $BRANCH" - exit 0 - fi + # Only want to commit when building a push on whatever $BRANCH is + if [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_BRANCH" == "$BRANCH" ]; then + # Set up SSH environment + $(npm bin)/set-up-ssh --key "$encrypted_8b86e0359d64_key" \ + --iv "$encrypted_8b86e0359d64_iv" \ + --path-encrypted-key "./.deploy.enc" - # Set up SSH environment - $(npm bin)/set-up-ssh --key "$encrypted_8b86e0359d64_key" \ - --iv "$encrypted_8b86e0359d64_iv" \ - --path-encrypted-key "./.deploy.enc" - - # Commit changes (if there were any) from running build earlier - $(npm bin)/commit-changes --commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \ - --branch "$BRANCH" + # Commit changes (if there were any) from running build earlier + $(npm bin)/commit-changes --commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \ + --branch "$BRANCH" + fi + echo "Not commiting build artifacts" + # Environment configuration env: global: