Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
fc37221d
Commit
fc37221d
authored
Jan 12, 2018
by
Spyros Trigazis
Committed by
Spyros Trigazis
Jan 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comparison of golang versions
Change hack/lib/golang.sh to compare golang version properly with "sort -s -t. -k 1,1 -k 2,2n -k 3,3n", which sorts key by key and not as strings.
parent
f6d0632b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
golang.sh
hack/lib/golang.sh
+1
-1
No files found.
hack/lib/golang.sh
View file @
fc37221d
...
@@ -323,7 +323,7 @@ EOF
...
@@ -323,7 +323,7 @@ EOF
go_version
=(
$(
go version
)
)
go_version
=(
$(
go version
)
)
local
minimum_go_version
local
minimum_go_version
minimum_go_version
=
go1.9.1
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
kube::log::usage_from_stdin
<<
EOF
Detected go version:
${
go_version
[*]
}
.
Detected go version:
${
go_version
[*]
}
.
Kubernetes requires
${
minimum_go_version
}
or greater.
Kubernetes requires
${
minimum_go_version
}
or greater.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment