build: Update the build script to make it possible to build for other architectures

This makes it possible to cross-compile cni like so:
$ GOARCH=arm ./build
$ GOARCH=arm64 ./build
$ GOARCH=ppc64le ./build

ref #209
This commit is contained in:
Lucas Käldström
2016-08-13 12:44:28 +03:00
parent 488db88fd1
commit fc58b79b45
2 changed files with 3 additions and 4 deletions

2
test
View File

@ -35,7 +35,7 @@ TEST=${split[@]/#/${REPO_PATH}/}
echo -n "Running tests "
function testrun {
sudo -E bash -c "umask 0; PATH=$GOROOT/bin:$GOBIN:$PATH go test -covermode set $@"
sudo -E bash -c "umask 0; PATH=$GOROOT/bin:$(pwd)/bin:$PATH go test -covermode set $@"
}
if [ ! -z "${COVERALLS}" ]; then
echo "with coverage profile generation..."