mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Simplify output of ensure_godep_version
This commit is contained in:
parent
d3b838b608
commit
26491cef81
@ -495,7 +495,7 @@ kube::util::ensure_clean_working_dir() {
|
|||||||
# Ensure that the given godep version is installed and in the path
|
# Ensure that the given godep version is installed and in the path
|
||||||
kube::util::ensure_godep_version() {
|
kube::util::ensure_godep_version() {
|
||||||
GODEP_VERSION=${1:-"v79"}
|
GODEP_VERSION=${1:-"v79"}
|
||||||
if [[ "$(godep version)" == *"godep ${GODEP_VERSION}"* ]]; then
|
if [[ "$(godep version 2>/dev/null)" == *"godep ${GODEP_VERSION}"* ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ kube::util::ensure_godep_version() {
|
|||||||
|
|
||||||
GOPATH="${KUBE_TEMP}/go" go get -d -u github.com/tools/godep 2>/dev/null
|
GOPATH="${KUBE_TEMP}/go" go get -d -u github.com/tools/godep 2>/dev/null
|
||||||
pushd "${KUBE_TEMP}/go/src/github.com/tools/godep" >/dev/null
|
pushd "${KUBE_TEMP}/go/src/github.com/tools/godep" >/dev/null
|
||||||
git checkout "${GODEP_VERSION}"
|
git checkout -q "${GODEP_VERSION}"
|
||||||
GOPATH="${KUBE_TEMP}/go" go install .
|
GOPATH="${KUBE_TEMP}/go" go install .
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user