Merge pull request #58225 from ixdy/gazelle-from-bazel-gazelle
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Install gazelle from bazelbuild/bazel-gazelle instead of rules_go **What this PR does / why we need it**: downloads gazelle from its new home; it's being removed from `bazelbuild/rules_go`. It also removes @spiffxp's workaround from a few weeks ago. **Special notes for your reviewer**: these should really be vendored (https://github.com/kubernetes/kubernetes/pull/57600), but this prevents us from running into issues in the meantime. **Release note**: ```release-note NONE ``` /approve no-issue /assign @BenTheElder
This commit is contained in:
commit
c7e3e55cd3
@ -476,15 +476,10 @@ kube::util::go_install_from_commit() {
|
||||
|
||||
kube::util::ensure-temp-dir
|
||||
mkdir -p "${KUBE_TEMP}/go/src"
|
||||
# TODO(spiffxp): remove this brittle workaround for go getting a package that doesn't exist at HEAD
|
||||
repo=$(echo ${pkg} | cut -d/ -f1-3)
|
||||
git clone "https://${repo}" "${KUBE_TEMP}/go/src/${repo}"
|
||||
# GOPATH="${KUBE_TEMP}/go" go get -d -u "${pkg}"
|
||||
GOPATH="${KUBE_TEMP}/go" go get -d -u "${pkg}"
|
||||
(
|
||||
cd "${KUBE_TEMP}/go/src/${repo}"
|
||||
git fetch # TODO(spiffxp): workaround
|
||||
cd "${KUBE_TEMP}/go/src/${pkg}"
|
||||
git checkout -q "${commit}"
|
||||
GOPATH="${KUBE_TEMP}/go" go get -d "${pkg}" #TODO(spiffxp): workaround
|
||||
GOPATH="${KUBE_TEMP}/go" go install "${pkg}"
|
||||
)
|
||||
PATH="${KUBE_TEMP}/go/bin:${PATH}"
|
||||
|
@ -31,8 +31,8 @@ kube::util::go_install_from_commit \
|
||||
github.com/kubernetes/repo-infra/kazel \
|
||||
ae4e9a3906ace4ba657b7a09242610c6266e832c
|
||||
kube::util::go_install_from_commit \
|
||||
github.com/bazelbuild/rules_go/go/tools/gazelle/gazelle \
|
||||
737df20c53499fd84b67f04c6ca9ccdee2e77089
|
||||
github.com/bazelbuild/bazel-gazelle/cmd/gazelle \
|
||||
31ce76e3acc34a22434d1a783bb9b3cae790d108 # 0.8.0
|
||||
|
||||
touch "${KUBE_ROOT}/vendor/BUILD"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user