From 4fe3e6545120a446f232eab48dec7bd37f6e52a7 Mon Sep 17 00:00:00 2001 From: Gianfranco Manganiello Date: Wed, 8 Nov 2017 15:19:18 -0400 Subject: [PATCH] ci(deploy): ignore deploy on pull request --- .travis.yml | 2 +- ci/scripts/deploy.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6a6bbf..6458183 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ install: - yarn install - sudo apt-get install jq before_script: - - git checkout $TRAVIS_BRANCH + - if [ $TRAVIS_PULL_REQUEST = false ]; then git checkout $TRAVIS_BRANCH fi script: - yarn test after_success: diff --git a/ci/scripts/deploy.sh b/ci/scripts/deploy.sh index 5217166..f100a67 100755 --- a/ci/scripts/deploy.sh +++ b/ci/scripts/deploy.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Deploy in develop -if [[ $TRAVIS_BRANCH == 'develop' ]]; then +if [[ $TRAVIS_BRANCH == 'develop' && $TRAVIS_PULL_REQUEST = false ]]; then if [[ $TRAVIS_COMMIT_MESSAGE != *"ci(release): generate CHANGELOG.md for version"* && $TRAVIS_COMMIT_MESSAGE != "build(react-winjs): transpile and minify library" ]]; then # Generate CHANGELOG.md and increment version yarn run release @@ -19,7 +19,7 @@ if [[ $TRAVIS_BRANCH == 'develop' ]]; then fi # Deploy in master -if [[ $TRAVIS_BRANCH == 'master' ]]; then +if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST = false ]]; then if [[ $TRAVIS_COMMIT_MESSAGE != *"ci(release): generate CHANGELOG.md for version"* && $TRAVIS_COMMIT_MESSAGE != "build(react-winjs): transpile and minify library" ]]; then # Generate CHANGELOG.md and increment version yarn run release -- -m 'ci(release): generate CHANGELOG.md for version %s'