Fix run-in-gopath issue with symlink'd gopath

pull/8/head
Christoph Blecker 2018-06-25 14:25:55 -07:00
parent 67e7d4c68f
commit 2edd10709c
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
2 changed files with 5 additions and 7 deletions

View File

@ -178,4 +178,3 @@ kube::realpath() {
fi
kube::readlinkdashf "$1"
}

View File

@ -20,8 +20,6 @@ set -o pipefail
export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
kube::util::ensure-gnu-sed
# Remove generated files prior to running kazel.
# TODO(spxtr): Remove this line once Bazel is the only way to build.
rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
@ -31,9 +29,8 @@ export GOBIN="${KUBE_OUTPUT_BINPATH}"
PATH="${GOBIN}:${PATH}"
# Install tools we need, but only from vendor/...
go install ./vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle
go install ./vendor/github.com/kubernetes/repo-infra/kazel
go install k8s.io/kubernetes/vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle
go install k8s.io/kubernetes/vendor/github.com/kubernetes/repo-infra/kazel
touch "${KUBE_ROOT}/vendor/BUILD"
# Ensure that we use the correct importmap for all vendored dependencies.
@ -46,6 +43,8 @@ fi
gazelle fix \
-build_file_name=BUILD,BUILD.bazel \
-external=vendored \
-mode=fix
-mode=fix \
-repo_root "${KUBE_ROOT}" \
"${KUBE_ROOT}"
kazel