travis: new travis_install_omf script to checkout PR

pull/52/head
jeremiejig 9 years ago
parent e68dca448a
commit 7919f8ef6a

@ -22,7 +22,10 @@ before_install:
- tests/install_fish.sh
before_script: pwd; tree -h
script: "/bin/sh bin/install"
script:
- /bin/sh tests/travis_install_omf.sh
after_script:
- cd ~/.config/fish; tree -h; find . -type f | xargs cat

@ -0,0 +1,21 @@
#!/bin/sh
git () {
case $1 in
clone)
command git "$@"
if test "$TRAVIS_PULL_REQUEST" != "false"; then
echo "! detecting a pull request !"
echo "$ git -C $OMF_PATH fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge:"
git -C $OMF_PATH fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge:
echo "$ git -C $OMF_PATH checkout -qf FETCH_HEAD"
git -C $OMF_PATH checkout -qf FETCH_HEAD
fi
;;
*)
command git "$@"
;;
esac
}
. $TRAVIS_BUILD_DIR/bin/install
Loading…
Cancel
Save