check for go binary in ci builds (#6570)

This commit is contained in:
Alvin Huang 2019-10-02 14:32:44 -04:00 committed by GitHub
parent 9bd378a95c
commit 590b061383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -9,13 +9,15 @@ GO_BUILD_CONTAINER_DEFAULT="consul-build-go"
COLORIZE=${COLORIZE-1}
# determine GOPATH and the first GOPATH to use for intalling binaries
GOPATH=${GOPATH:-$(go env GOPATH)}
case $(uname) in
CYGWIN*)
GOPATH="$(cygpath $GOPATH)"
;;
esac
MAIN_GOPATH=$(cut -d: -f1 <<< "${GOPATH}")
if command -v go >/dev/null; then
GOPATH=${GOPATH:-$(go env GOPATH)}
case $(uname) in
CYGWIN*)
GOPATH="$(cygpath $GOPATH)"
;;
esac
MAIN_GOPATH=$(cut -d: -f1 <<< "${GOPATH}")
fi
# Build debugging output is off by default
BUILD_DEBUG=${BUILD_DEBUG-0}