mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-23 12:04:11 +08:00
travis: new travis_install_omf script to checkout PR
This commit is contained in:
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
|
||||
|
||||
|
21
tests/travis_install_omf.sh
Executable file
21
tests/travis_install_omf.sh
Executable file
@ -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…
x
Reference in New Issue
Block a user