Skip to content

Commit

Permalink
Adjust TRAVIS_COMMIT_RANGE variable in pull-or-rebuild-image.sh
Browse files Browse the repository at this point in the history
to contain only commits from a PR.

Ref: travis-ci/travis-ci/issues/4596
  • Loading branch information
igchor committed Mar 14, 2019
1 parent 964549b commit 25c5d86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/docker/pull-or-rebuild-image.sh
Expand Up @@ -85,7 +85,11 @@ fi

# Find all the commits for the current build
if [[ -n "$TRAVIS_COMMIT_RANGE" ]]; then
commits=$(git rev-list $TRAVIS_COMMIT_RANGE)
# $TRAVIS_COMMIT_RANGE contains "..." instead of ".."
# https://github.com/travis-ci/travis-ci/issues/4596
PR_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}"

commits=$(git rev-list $PR_COMMIT_RANGE)
else
commits=$TRAVIS_COMMIT
fi
Expand Down

0 comments on commit 25c5d86

Please sign in to comment.