mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
update-bazel.sh to treat GOPATH as a path
Adds functionality to look at the components of the GOPATH looking for the gazel executable, rather than treating the GOPATH as if it was a single directory.
This commit is contained in:
parent
2be53cf0f8
commit
2dc36870c4
@ -23,4 +23,15 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
|
|||||||
git config http.https://gopkg.in.followRedirects true
|
git config http.https://gopkg.in.followRedirects true
|
||||||
|
|
||||||
go get -u gopkg.in/mikedanese/gazel.v14/gazel
|
go get -u gopkg.in/mikedanese/gazel.v14/gazel
|
||||||
"${GOPATH}/bin/gazel" -root="$(kube::realpath ${KUBE_ROOT})"
|
|
||||||
|
for path in ${GOPATH//:/ }; do
|
||||||
|
if [[ -e "${path}/bin/gazel" ]]; then
|
||||||
|
gazel="${path}/bin/gazel"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ -z "${gazel:-}" ]]; then
|
||||||
|
echo "Couldn't find gazel on the GOPATH."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
"${gazel}" -root="$(kube::realpath ${KUBE_ROOT})"
|
||||||
|
Loading…
Reference in New Issue
Block a user