[ci] fix missing local branch issues

This commit is contained in:
BBG
2019-05-02 00:01:23 +08:00
parent 15af96155f
commit 2057fc3919

View File

@ -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