Skip to content

Commit c59b6ef

Browse files
committed
travis: when pull request and files in folder .ci not changed, build with ci files in master branch
Signed-off-by: jingru <[email protected]>
1 parent 5d5ed31 commit c59b6ef

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ before_install:
4141
- git config --global user.name "embARC Automated Bot"
4242
- git config --global user.email "[email protected]"
4343
- >
44-
if [ "TRAVIS_PULL_REQUEST" != "false" ]; then
45-
git checkout remotes/origin/master -- .ci
44+
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
45+
diff=$(git diff FETCH_HEAD master .ci)
46+
if [ "$diff" != ""]; then
47+
git checkout remotes/origin/master -- .ci
48+
fi
4649
fi
4750
- bash .ci/before_install.sh
4851

0 commit comments

Comments
 (0)