Ensure build.sh uses dependencies vendored by godeps

This commit is contained in:
Matt Button 2015-07-06 22:55:26 +01:00 committed by Matt Button
parent f0566c3120
commit 2d0777a32f
1 changed files with 9 additions and 10 deletions

View File

@ -19,9 +19,14 @@ GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)
XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
XC_OS=${XC_OS:-linux darwin windows freebsd openbsd}
# Install dependencies
echo "==> Getting dependencies..."
go get ./...
# Store the original GOPATH so we can move the binary to it later
ORIGINAL_GOPATH=${GOPATH:-$(go env GOPATH)}
GOPATH="$(godep path):$ORIGINAL_GOPATH"
case $(uname) in
CYGWIN*)
ORIGINAL_GOPATH="$(cygpath $ORIGINAL_GOPATH)"
;;
esac
# Delete the old dir
echo "==> Removing old directory..."
@ -47,14 +52,8 @@ gox \
.
# Move all the compiled things to the $GOPATH/bin
GOPATH=${GOPATH:-$(go env GOPATH)}
case $(uname) in
CYGWIN*)
GOPATH="$(cygpath $GOPATH)"
;;
esac
OLDIFS=$IFS
IFS=: MAIN_GOPATH=($GOPATH)
IFS=: MAIN_GOPATH=($ORIGINAL_GOPATH)
IFS=$OLDIFS
# Copy our OS/Arch to the bin/ directory