Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to allow new golang versions #22643

Merged
merged 1 commit into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions hack/lib/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ kube::version::load_version_vars() {
source "${version_file}"
}

# golang 1.5 wants `-X key=val`, but golang 1.4- REQUIRES `-X key val`
# golang 1.5+ wants `-X key=val`, but golang 1.4- REQUIRES `-X key val`
kube::version::ldflag() {
local key=${1}
local val=${2}

GO_VERSION=($(go version))

if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.5') ]]; then
if [[ -n $(echo "${GO_VERSION[2]}" | grep -E 'go1.1|go1.2|go1.3|go1.4') ]]; then
echo "-X ${KUBE_GO_PACKAGE}/pkg/version.${key} ${val}"
else
echo "-X ${KUBE_GO_PACKAGE}/pkg/version.${key}=${val}"
Expand Down
2 changes: 1 addition & 1 deletion hack/update-gofmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..

GO_VERSION=($(go version))

if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.4|go1.5') ]]; then
if [[ -n $(echo "${GO_VERSION[2]}" | grep -E 'go1.1|go1.2|go1.3') ]]; then
echo "Unsupported go version '${GO_VERSION}', skipping gofmt."
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion hack/verify-gofmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..

GO_VERSION=($(go version))

if [[ -z $(echo "${GO_VERSION[2]}" | grep -E 'go1.4|go1.5') ]]; then
if [[ -n $(echo "${GO_VERSION[2]}" | grep -E 'go1.1|go1.2|go1.3') ]]; then
echo "Unsupported go version '${GO_VERSION}', skipping gofmt."
exit 0
fi
Expand Down