#!/bin/sh

set -e -x

if ! which go 2>/dev/null; then
  echo "Go is not installed."
  exit 1
fi

local_gopath=$PWD/Godeps/_workspace

mkdir -p $local_gopath/bin

export GOPATH=$local_gopath:$GOPATH
export PATH=$local_gopath/bin:$PATH

echo "Compiling smoke"
go test -v -c ./smoke/
rm -f smoke.test
echo "Compiling ./..."
go build -v ./...
