mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Add a version check for go.
This commit is contained in:
parent
f57ae2f4bf
commit
35bf0fc0b7
@ -21,6 +21,20 @@ if [ "$(which go)" == "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Travis continuous build uses a head go release that doesn't report
|
||||
# a version number, so we skip this check on Travis. Its unnecessary
|
||||
# there anyway.
|
||||
if [ ${TRAVIS} != "true" ]; then
|
||||
GO_VERSION=($(go version))
|
||||
|
||||
if [ ${GO_VERSION[2]} \< "go1.2" ]; then
|
||||
echo "Detected go version: ${GO_VERSION}."
|
||||
echo "Kubernetes requires go version 1.2 or greater."
|
||||
echo "Please install Go version 1.2 or later"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
pushd $(dirname "${BASH_SOURCE}")/.. >/dev/null
|
||||
KUBE_REPO_ROOT="${PWD}"
|
||||
KUBE_TARGET="${KUBE_REPO_ROOT}/output/go"
|
||||
|
Loading…
Reference in New Issue
Block a user