fix running local test-sanity (#13482)

This commit is contained in:
Jack May 2020-11-09 15:03:44 -08:00 committed by GitHub
parent 14fb75927e
commit 2eb637d52f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -8,10 +8,16 @@ source ci/_
(
echo --- git diff --check
set -x
if [[ -n $CI_BASE_BRANCH ]]
then branch="$CI_BASE_BRANCH"
else branch="master"
fi
# Look for failed mergify.io backports by searching leftover conflict markers
# Also check for any trailing whitespaces!
git fetch origin "$CI_BASE_BRANCH"
git diff "$(git merge-base HEAD "origin/$CI_BASE_BRANCH")..HEAD" --check --oneline
git fetch origin "$branch"
git diff "$(git merge-base HEAD "origin/$branch")" --check --oneline
)
echo