zachgersh 8817b1b946 build script: remove the _workspace from GOPATH
Now that we no longer use godeps to manage
dependencies we can safely remove this.
Dependencies in the vendor directory will
automagically be picked up.
2016-03-21 09:32:09 -07:00

31 lines
588 B
Bash
Executable File

#!/usr/bin/env bash
set -e
ORG_PATH="github.com/appc"
REPO_PATH="${ORG_PATH}/cni"
if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi
export GOBIN=${PWD}/bin
export GOPATH=${PWD}/gopath
echo "Building API"
go build ${REPO_PATH}/libcni
echo "Building reference CLI"
go install ${REPO_PATH}/cnitool
echo "Building plugins"
PLUGINS="plugins/meta/* plugins/main/* plugins/ipam/*"
for d in $PLUGINS; do
if [ -d $d ]; then
plugin=$(basename $d)
echo " " $plugin
go install ${REPO_PATH}/$d
fi
done