travis integration

- go build instead of go install to support cross-compile to bin dir
- shellcheck fixes for build script
This commit is contained in:
Gabe Rosenhouse
2017-05-03 10:07:29 -07:00
parent c11286b835
commit 1e3715157c
2 changed files with 46 additions and 5 deletions

10
build
View File

@ -12,15 +12,15 @@ fi
export GO15VENDOREXPERIMENT=1
export GOPATH=${PWD}/gopath
mkdir -p ${PWD}/bin
mkdir -p "${PWD}/bin"
echo "Building plugins"
PLUGINS="plugins/*"
for d in $PLUGINS; do
if [ -d $d ]; then
plugin=$(basename $d)
echo " " $plugin
if [ -d "$d" ]; then
plugin="$(basename "$d")"
echo " $plugin"
# use go install so we don't duplicate work
GOBIN=${PWD}/bin go install -pkgdir $GOPATH/pkg "$@" $REPO_PATH/$d
go build -o "${PWD}/bin/$plugin" -pkgdir "$GOPATH/pkg" "$@" "$REPO_PATH/$d"
fi
done