Skip to content

Commit 84469e1

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Corrected simplified astyle job behavior when base branch is not master
Consolidated efforts from PR ARMmbed#9336. Previous job's env vars would not be populated correctly if the base branch of a PR was not master. Corected by pulling remaining respository information to perform comparison between read-only instance of PR and base branch.
1 parent 28d5477 commit 84469e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,12 @@ matrix:
144144
export PATH=$PWD/bin:$PATH;
145145
cd -
146146
- astyle --version
147+
# Fetch remaining information needed for branch comparison
148+
- git fetch --all --unshallow --tags
149+
- git fetch origin "${TRAVIS_BRANCH}"
147150
script:
148151
- >-
149-
git diff --name-only --diff-filter=d HEAD..${TRAVIS_BRANCH} \
152+
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
150153
| ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \
151154
| ( fgrep -v -f .astyleignore || true ) \
152155
| while read file; do astyle -n --options=.astylerc "${file}"; done

0 commit comments

Comments
 (0)