diff --git a/.travis/build-deploy.sh b/.travis/build-deploy.sh index 8d26b44b08..f5a97b19a2 100755 --- a/.travis/build-deploy.sh +++ b/.travis/build-deploy.sh @@ -60,9 +60,12 @@ elif travis_isPullRequest; then log_info "This is a pull-request build" ./mvnw verify $MVN_BUILD_FLAGS ( - set +e - log_info "Running danger" - bundle exec danger --verbose + set +e + # if ${TRAVIS_BRANCH} is master, the script will fail since there is local master branch + git checkout -b ${TRAVIS_BRANCH} origin/${TRAVIS_BRANCH} + git checkout -qf FETCH_HEAD + log_info "Running danger" + bundle exec danger --verbose ) elif travis_isPush; then