diff --git a/.travis.yml b/.travis.yml index ea67b911..70fba2e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ sudo: false script: - make docs/build-matrix.html docs/packages.json OS_SHORT_NAME=disable-native-plugins MXE_TARGETS="`echo {i686-w64-mingw32,x86_64-w64-mingw32}.{static,shared}`" - - if [ "$GH_TOKEN" != "" ]; then [ `git rev-parse --abbrev-ref HEAD` == master ] && ./tools/travis-push.sh; fi + - if [ "$GH_TOKEN" != "" ]; then ./tools/travis-push.sh; fi # Package wxwidgets is downloaded for more than 10 minutes, # Travis failed because of no output for 10 minutes. - while true; do sleep 60; echo -n ' '; done & diff --git a/tools/travis-push.sh b/tools/travis-push.sh index c8d4b1b5..70fff8c5 100755 --- a/tools/travis-push.sh +++ b/tools/travis-push.sh @@ -9,4 +9,4 @@ git config credential.helper "store --file=.git/credentials" echo "https://${GH_TOKEN}:@github.com" > .git/credentials git remote set-url origin 'https://github.com/mxe/mxe.git' git commit -a -m 'Update packages.json & build-matrix.html' || true -git push origin HEAD:master +[ `git rev-parse --abbrev-ref HEAD` == master ] && git push origin HEAD:master