Merge pull request #924 from LuaAndC/travis-build-pulls

fix travis builds for pull requests
This commit is contained in:
Tony Theodore 2015-11-18 20:53:22 +11:00
commit 1e4c381a4c
2 changed files with 14 additions and 9 deletions

View File

@ -3,15 +3,7 @@ sudo: false
script:
- make versions.json
- git config --global user.email 'mxebot@gmail.com'
- git config --global user.name 'MXEBot as Travis CI'
- git config --global push.default simple
- 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 versions.json' || true
- git push origin HEAD:master
- git push origin HEAD:gh-pages
- if [ "$GH_TOKEN" != "" ]; then ./tools/travis-push.sh; fi
env:
global:

13
tools/travis-push.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -ue
git config --global user.email 'mxebot@gmail.com'
git config --global user.name 'MXEBot as Travis CI'
git config --global push.default simple
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 versions.json'
git push origin HEAD:master
git push origin HEAD:gh-pages