-
Notifications
You must be signed in to change notification settings - Fork 39.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fork godep to fix inconsistent abbreviation size #70718
Changes from all commits
57e1d0a
db89546
9d241ec
c0c6282
35cdbdf
64173fb
d15da2c
bc7e7e5
c0967ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -441,28 +441,30 @@ kube::util::ensure_clean_working_dir() { | |
|
||
# Ensure that the given godep version is installed and in the path. Almost | ||
# nobody should use any version but the default. | ||
# | ||
# Sets: | ||
# KUBE_GODEP: The path to the godep binary | ||
# | ||
kube::util::ensure_godep_version() { | ||
GODEP_VERSION=${1:-"v80"} # this version is known to work | ||
local godep_target_version=${1:-"v80-k8s-r1"} # this version is known to work | ||
|
||
if [[ "$(godep version 2>/dev/null)" == *"godep ${GODEP_VERSION}"* ]]; then | ||
# If KUBE_GODEP is already set, and it's the right version, then use it. | ||
if [[ -n "${KUBE_GODEP:-}" && "$(${KUBE_GODEP:?} version 2>/dev/null)" == *"godep ${godep_target_version}"* ]]; then | ||
kube::log::status "Using ${KUBE_GODEP}" | ||
return | ||
fi | ||
|
||
kube::log::status "Installing godep version ${GODEP_VERSION}" | ||
go install k8s.io/kubernetes/vendor/github.com/tools/godep/ | ||
if ! which godep >/dev/null 2>&1; then | ||
kube::log::error "Can't find godep - is your GOPATH 'bin' in your PATH?" | ||
kube::log::error " GOPATH: ${GOPATH}" | ||
kube::log::error " PATH: ${PATH}" | ||
return 1 | ||
fi | ||
|
||
if [[ "$(godep version 2>/dev/null)" != *"godep ${GODEP_VERSION}"* ]]; then | ||
kube::log::error "Wrong godep version - is your GOPATH 'bin' in your PATH?" | ||
kube::log::error " expected: godep ${GODEP_VERSION}" | ||
kube::log::error " got: $(godep version)" | ||
kube::log::error " GOPATH: ${GOPATH}" | ||
kube::log::error " PATH: ${PATH}" | ||
# Otherwise, install forked godep | ||
kube::log::status "Installing godep version ${godep_target_version}" | ||
# Run in hermetic GOPATH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this have implications for callers of this function who might find themselves in a new directory? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not that I've found in my testing. It doesn't impact the CWD or environment once the calling bash script itself exits out (either godep-restore or godep-save). |
||
kube::golang::setup_env | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this line is now causing This means that cc @apelisse There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, you're right. Fix in #71538 |
||
go install k8s.io/kubernetes/third_party/forked/godep | ||
export KUBE_GODEP="${KUBE_GOPATH}/bin/godep" | ||
kube::log::status "Installed ${KUBE_GODEP}" | ||
|
||
# Verify that the installed godep from fork is what we expect | ||
if [[ "$(${KUBE_GODEP:?} version 2>/dev/null)" != *"godep ${godep_target_version}"* ]]; then | ||
kube::log::error "Expected godep ${godep_target_version} from ${KUBE_GODEP}, got $(${KUBE_GODEP:?} version)" | ||
return 1 | ||
fi | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we not want to ensure that the binary gets built?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list is the "additional go repos to vendor that aren't explicit code dependencies" list. It's not exceptionally well named.