Make hack scripts use go install and assume PATH
Now that they all call setup_env, we don't need find-binary (I think). That was originally meant to hide the diff between docker and local builds but all these tools do local builds anyway.
This commit is contained in:
@@ -18,8 +18,10 @@ set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
source hack/lib/util.sh
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
kube::util::require-jq
|
||||
kube::util::ensure_clean_working_dir
|
||||
|
||||
@@ -62,9 +64,11 @@ git add .
|
||||
git commit -a -m "Update kubectl kustomize to kyaml/$LATEST_KYAML, cmd/config/$LATEST_CONFIG, api/$LATEST_API, kustomize/$LATEST_KUSTOMIZE"
|
||||
|
||||
echo -e "\n${color_blue:?}Verifying kubectl kustomize version${color_norm:?}"
|
||||
make WHAT=cmd/kubectl
|
||||
# We use `make` here intead of `go install` to ensure that all of the
|
||||
# linker-defined values are set.
|
||||
make -C "${KUBE_ROOT}" WHAT=./cmd/kubectl
|
||||
|
||||
if [[ $(_output/bin/kubectl version --client -o json | jq -r '.kustomizeVersion') != "$LATEST_KUSTOMIZE" ]]; then
|
||||
if [[ $(kubectl version --client -o json | jq -r '.kustomizeVersion') != "$LATEST_KUSTOMIZE" ]]; then
|
||||
echo -e "${color_red:?}Unexpected kubectl kustomize version${color_norm:?}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user