Skip to content

Commit

Permalink
chore(ci): change diff code for non pr branches (#1644)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Jul 1, 2019
1 parent ff4dc8b commit ee2f235
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/ci/travis-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ CURRENT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRA
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
fileDiff=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
else
fileDiff=$(git diff --name-only $TRAVIS_BRANCH...HEAD)
git remote set-branches --add origin $TRAVIS_BRANCH
git fetch origin $TRAVIS_BRANCH
fileDiff=$(git diff --name-only HEAD origin/${TRAVIS_BRANCH})
fi

# Check if tests can be skipped
Expand Down

0 comments on commit ee2f235

Please sign in to comment.