Skip to content
Snippets Groups Projects
Commit c239e359 authored by Martine Lenders's avatar Martine Lenders
Browse files

travis: warn about differing .travis.yml

parent 0e285e89
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,21 @@ then
then
RESULT=0
if git diff master HEAD -- .travis.yml &> /dev/null; then
# check if .travis.yml was changed in the current PR and skip if so
if ! git diff --name-only $(git merge-base HEAD master)..HEAD -- \
.travis.yml &> 1; then
echo "==============================================================" >&2
echo -e "\033[1;31m.travis.yml differs in upstream.\033[0m"
echo -e "\033[1;31mPlease rebase your PR to current upstream or expect errors!!!!\033[0m" >&2
echo " git fetch https://github.com/RIOT-OS/RIOT master" >&2
echo " git rebase FETCH_HEAD" >&2
echo " git push -f origin $(git rev-parse --abbrev-ref HEAD)" >&2
echo "==============================================================" >&2
return 1
fi
fi
git rebase master || git rebase --abort
RESULT=$(set_result $? $RESULT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment