Rename build script to avoid conflict with bazel

This commit is contained in:
Casey Callendrello
2017-05-15 16:45:58 +02:00
parent f130db5b61
commit 1430c43243
3 changed files with 2 additions and 2 deletions

26
build.sh Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e
ORG_PATH="github.com/containernetworking"
export REPO_PATH="${ORG_PATH}/plugins"
if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi
export GO15VENDOREXPERIMENT=1
export GOPATH=${PWD}/gopath
mkdir -p "${PWD}/bin"
echo "Building plugins"
PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/* plugins/sample"
for d in $PLUGINS; do
if [ -d "$d" ]; then
plugin="$(basename "$d")"
echo " $plugin"
# use go install so we don't duplicate work
go build -o "${PWD}/bin/$plugin" -pkgdir "$GOPATH/pkg" "$@" "$REPO_PATH/$d"
fi
done