mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Default to allow new golang versions
Out tests for features that didn't exist in old golang versions (like gofmt didn't exist in 1.3 or the linker didn't want an = in 1.4) checked for the new version. But this means every time there is a new version we have to update the test. This PR inverts the test. We do it the old way for the old version and if a new version comes along we just assume it is going to work the new way.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user