Skip to content

Commit 5624246

Browse files
author
Wayne Ren
authored
Merge pull request #91 from wangnuannuan/feature/travis
travis: when pull request and files in folder .ci not changed, build with ci files in master branch
2 parents 26b0b86 + c8eb116 commit 5624246

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,17 @@ branches:
3737
- gh-pages
3838

3939
before_install:
40-
- bash .ci/before_install.sh
4140
# setup git config
4241
- git config --global user.name "embARC Automated Bot"
4342
- git config --global user.email "[email protected]"
43+
- >
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
49+
fi
50+
- bash .ci/before_install.sh
4451

4552
after_success:
4653
- bash -c "$STATUS" success "Local $NAME testing has passed"

0 commit comments

Comments
 (0)