kubernetes: patch broken go version check
fixes #35403 patch from https://github.com/kubernetes/kubernetes/pull/58207 already merged upstream - remove for next version
This commit is contained in:
parent
b492e2a164
commit
b54e5b908d
@ -29,6 +29,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = ["out" "man" "pause"];
|
||||
|
||||
# patch broken go version check, see issue #35403
|
||||
# patch is from https://github.com/kubernetes/kubernetes/pull/58207
|
||||
#TODO: patch already merged upstream - remove for next k8s version
|
||||
patches = [ ./go-version-check.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace "hack/lib/golang.sh" --replace "_cgo" ""
|
||||
substituteInPlace "hack/generate-docs.sh" --replace "make" "make SHELL=${stdenv.shell}"
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/hack/lib/golang.sh
|
||||
+++ b/hack/lib/golang.sh
|
||||
@@ -323,7 +323,7 @@ EOF
|
||||
go_version=($(go version))
|
||||
local minimum_go_version
|
||||
minimum_go_version=go1.9.1
|
||||
- if [[ "${go_version[2]}" < "${minimum_go_version}" && "${go_version[2]}" != "devel" ]]; then
|
||||
+ if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
|
||||
kube::log::usage_from_stdin <<EOF
|
||||
Detected go version: ${go_version[*]}.
|
||||
Kubernetes requires ${minimum_go_version} or greater.
|
Loading…
Reference in New Issue
Block a user