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
d038c53c
Commit
d038c53c
authored
May 31, 2016
by
David McMahon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for a valid godep version.
parent
1cca499e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
golang.sh
hack/lib/golang.sh
+27
-0
verify-godeps.sh
hack/verify-godeps.sh
+1
-0
No files found.
hack/lib/golang.sh
View file @
d038c53c
...
...
@@ -259,6 +259,33 @@ kube::golang::create_gopath_tree() {
ln
-s
"
${
KUBE_ROOT
}
"
"
${
go_pkg_dir
}
"
}
# Ensure the godep tool exists and is a viable version.
kube::golang::verify_godep_version
()
{
local
-a
godep_version_string
local
godep_version
local
godep_min_version
=
"63"
if
!
which godep &>/dev/null
;
then
kube::log::usage_from_stdin
<<
EOF
Can't find 'godep' in PATH, please fix and retry.
See https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md#godep-and-dependency-management for installation instructions.
EOF
return
2
fi
godep_version_string
=(
$(
godep version
)
)
godep_version
=
${
godep_version_string
[1]/v/
}
if
((
godep_version<
$godep_min_version
))
;
then
kube::log::usage_from_stdin
<<
EOF
Detected godep version:
${
godep_version_string
[*]
}
.
Kubernetes requires godep v
$godep_min_version
or greater.
Please update:
go get -u github.com/tools/godep
EOF
return
2
fi
}
# Ensure the go tool exists and is a viable version.
kube::golang::verify_go_version
()
{
if
[[
-z
"
$(
which go
)
"
]]
;
then
...
...
hack/verify-godeps.sh
View file @
d038c53c
...
...
@@ -41,6 +41,7 @@ preload-dep() {
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
kube::golang::verify_godep_version
readonly
branch
=
${
1
:-${
KUBE_VERIFY_GIT_BRANCH
:-
master
}}
if
!
[[
${
KUBE_FORCE_VERIFY_CHECKS
:-}
=
~ ^[yY]
$
]]
&&
\
...
...
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