Merge pull request #9346 from cmonr/astyle_in_branch-fix

Travis CI: Corrected astyle job behavior with non-master base branch PRs
pull/9323/merge
Martin Kojtal 2019-01-11 13:06:29 +00:00 committed by GitHub
commit c3077d2053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -144,9 +144,12 @@ matrix:
export PATH=$PWD/bin:$PATH;
cd -
- astyle --version
# Fetch remaining information needed for branch comparison
- git fetch --all --unshallow --tags
- git fetch origin "${TRAVIS_BRANCH}"
script:
- >-
git diff --name-only --diff-filter=d HEAD..${TRAVIS_BRANCH} \
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
| ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \
| ( fgrep -v -f .astyleignore || true ) \
| while read file; do astyle -n --options=.astylerc "${file}"; done