2017-11-22 15:27:35 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
|
2020-09-02 12:28:33 +08:00
|
|
|
export TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}
|
2017-11-22 15:27:35 +08:00
|
|
|
if [ "$LINT" = "vimlint-errors" ] ; then
|
|
|
|
if [[ -f build_log ]]; then
|
|
|
|
if [[ -d build/GitHub.vim ]]; then
|
|
|
|
rm -rf build/GitHub.vim
|
|
|
|
fi
|
|
|
|
VIMLINT_LOG=`cat build_log`
|
2020-09-02 22:56:53 +08:00
|
|
|
echo $VIMLINT_LOG
|
2017-11-22 15:27:35 +08:00
|
|
|
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
2019-01-28 22:12:37 +08:00
|
|
|
docker run \
|
|
|
|
-it --rm \
|
2020-09-02 12:28:33 +08:00
|
|
|
-e TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} \
|
2017-11-22 15:27:35 +08:00
|
|
|
-v $PWD/.ci:/.ci \
|
2017-12-03 22:34:37 +08:00
|
|
|
-v $PWD/autoload/SpaceVim/api:/API/autoload/SpaceVim/api \
|
|
|
|
-v $PWD/autoload/SpaceVim/api.vim:/API/autoload/SpaceVim/api.vim \
|
2017-11-22 15:27:35 +08:00
|
|
|
-v $PWD/build:/build \
|
2018-01-24 23:33:49 +08:00
|
|
|
spacevim/vims vim8 -u /.ci/common/github_commenter.vim
|
2017-11-22 15:27:35 +08:00
|
|
|
rm build_log
|
|
|
|
fi
|
2020-09-02 22:56:53 +08:00
|
|
|
elif [ "$LINT" = "vimlint" ] ; then
|
|
|
|
if [[ -f build_log ]]; then
|
|
|
|
VIMLINT_LOG=`cat build_log`
|
|
|
|
echo $VIMLINT_LOG
|
|
|
|
rm build_log
|
|
|
|
fi
|
|
|
|
elif [ "$LINT" = "vint" ] ; then
|
|
|
|
if [[ -f build_log ]]; then
|
|
|
|
VIMLINT_LOG=`cat build_log`
|
|
|
|
echo $VIMLINT_LOG
|
|
|
|
rm build_log
|
|
|
|
fi
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "$LINT" = "vint-errors" ] ; then
|
|
|
|
if [[ -f build_log ]]; then
|
|
|
|
if [[ -d build/GitHub.vim ]]; then
|
|
|
|
rm -rf build/GitHub.vim
|
|
|
|
fi
|
|
|
|
VIMLINT_LOG=`cat build_log`
|
2020-09-02 22:56:53 +08:00
|
|
|
echo $VIMLINT_LOG
|
2017-11-22 15:27:35 +08:00
|
|
|
git clone https://github.com/wsdjeg/GitHub.vim.git build/GitHub.vim
|
|
|
|
docker run -it --rm \
|
2020-09-02 12:28:33 +08:00
|
|
|
-e TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} \
|
2017-11-22 15:27:35 +08:00
|
|
|
-v $PWD/.ci:/.ci \
|
2017-12-03 22:34:37 +08:00
|
|
|
-v $PWD/autoload/SpaceVim/api:/API/autoload/SpaceVim/api \
|
|
|
|
-v $PWD/autoload/SpaceVim/api.vim:/API/autoload/SpaceVim/api.vim \
|
2017-11-22 15:27:35 +08:00
|
|
|
-v $PWD/build:/build \
|
2018-01-24 23:33:49 +08:00
|
|
|
spacevim/vims vim8 -u /.ci/common/github_commenter.vim
|
2017-11-22 15:27:35 +08:00
|
|
|
rm build_log
|
|
|
|
fi
|
|
|
|
elif [ "$LINT" = "vader" ] ; then
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
fi
|