Make go version requirements clearer

This commit is contained in:
Tim Hockin
2015-12-02 09:54:21 -08:00
parent b9aa71089e
commit 0df07424e7
7 changed files with 27 additions and 13 deletions

View File

@@ -240,12 +240,12 @@ EOF
if [[ "${TRAVIS:-}" != "true" ]]; then
local go_version
go_version=($(go version))
if [[ "${go_version[2]}" < "go1.2" ]]; then
if [[ "${go_version[2]}" < "go1.4" ]]; then
kube::log::usage_from_stdin <<EOF
Detected go version: ${go_version[*]}.
Kubernetes requires go version 1.2 or greater.
Please install Go version 1.2 or later.
Kubernetes requires go version 1.4 or greater.
Please install Go version 1.4 or later.
EOF
exit 2

View File

@@ -24,8 +24,8 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
GO_VERSION=($(go version))
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5') ]]; then
echo "Unknown go version '${GO_VERSION}', skipping gofmt."
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.4|go1.5') ]]; then
echo "Unsupported go version '${GO_VERSION}', skipping gofmt."
exit 0
fi

View File

@@ -24,8 +24,8 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
GO_VERSION=($(go version))
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.2|go1.3|go1.4|go1.5') ]]; then
echo "Unknown go version '${GO_VERSION}', skipping gofmt."
if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.4|go1.5') ]]; then
echo "Unsupported go version '${GO_VERSION}', skipping gofmt."
exit 0
fi