630be49632
subrepo: subdir: "dotfiles/.vim/plugged/vim-go" merged: "22b2273cf" upstream: origin: "https://github.com/fatih/vim-go.git" branch: "master" commit: "22b2273cf" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
35 lines
1.1 KiB
Bash
Executable file
35 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Install and setup a Vim or Neovim for running tests.
|
|
# This should work on both GitHub Actions and people's desktop computers, and
|
|
# be 100% independent from any system installed Vim.
|
|
#
|
|
|
|
set -euC
|
|
|
|
vimgodir=$(cd -P "$(dirname "$0")/.." > /dev/null && pwd)
|
|
cd "$vimgodir"
|
|
|
|
vim=${1:-}
|
|
|
|
installdir="/tmp/vim-go-test/$1-install"
|
|
|
|
# Make sure all Go tools and other dependencies are installed.
|
|
echo "Installing Go binaries"
|
|
export GOPATH=$installdir
|
|
export GO111MODULE=on
|
|
export PATH="${GOPATH}/bin:$PATH"
|
|
"$vimgodir/scripts/run-vim" $vim +':silent :GoUpdateBinaries' +':qa'
|
|
|
|
echo "Installing lint tools"
|
|
(
|
|
mkdir -p "$installdir/share/vim/vimgo/pack/vim-go/start/"
|
|
cd "$installdir/share/vim/vimgo/pack/vim-go/start/"
|
|
[ -d "vim-vimhelplint" ] || git clone --depth 1 --quiet https://github.com/machakann/vim-vimhelplint
|
|
[ -d "vim-vimlparser" ] || git clone --depth 1 --quiet https://github.com/ynkdir/vim-vimlparser
|
|
[ -d "vim-vimlint" ] || git clone --depth 1 --quiet https://github.com/syngan/vim-vimlint
|
|
)
|
|
|
|
echo "vim-go tools installed to: $installdir/share/vim/vimgo/pack/vim-go/start"
|
|
|
|
# vim:ts=2:sts=2:sw=2:et
|