diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-10-13 09:34:34 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2015-10-13 09:34:34 (GMT) |
commit | d64c26e6f216526c2aa34d8783c0e407fc7389c5 (patch) | |
tree | e7f8d8e2a79f3be8ee08a00cc43c8354e29d37de /tools/travis-push.sh | |
parent | b19d9128ac5f0cb63b7ab8247a395028ab698129 (diff) | |
download | mxe-d64c26e6f216526c2aa34d8783c0e407fc7389c5.zip mxe-d64c26e6f216526c2aa34d8783c0e407fc7389c5.tar.gz mxe-d64c26e6f216526c2aa34d8783c0e407fc7389c5.tar.bz2 |
travis: commit and push only if GH_TOKEN is set
This allows to enable travis build for a pull request without failing it.
This is useful to check at leat that Makefile syntax is correct.
Diffstat (limited to 'tools/travis-push.sh')
-rwxr-xr-x | tools/travis-push.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/travis-push.sh b/tools/travis-push.sh new file mode 100755 index 0000000..8aa02c0 --- /dev/null +++ b/tools/travis-push.sh @@ -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' || true +git push origin HEAD:master +git push origin HEAD:gh-pages |