Skip to content

Commit

Permalink
update-bazel.sh to treat GOPATH as a path
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jcbsmpsn committed Feb 16, 2017
1 parent 2be53cf commit 2dc3687
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion hack/update-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
git config http.https://gopkg.in.followRedirects true

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})"

0 comments on commit 2dc3687

Please sign in to comment.