Skip to content

Commit

Permalink
PR Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Apurv Parekh committed Mar 1, 2024
1 parent edf8f07 commit be0e399
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hack/ensure-kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ MINIMUM_KUSTOMIZE_VERSION=3.8.2
# Ensure the kustomize tool exists and is a viable version, or installs it
verify_kustomize_version() {

which curl
# If kustomize is not available on the path, get it
if ! [ -x "$(command -v kustomize)" ]; then
if [[ "${OSTYPE}" == "linux-gnu" ]]; then
echo 'kustomize not found, installing'
if ! [ -d "${GOPATH_BIN}" ]; then
mkdir -p "${GOPATH_BIN}"
fi
curl -sLo "${GOPATH_BIN}/kustomize" https://github.com/kubernetes-sigs/kustomize/releases/download/v${MINIMUM_KUSTOMIZE_VERSION}/kustomize_${MINIMUM_KUSTOMIZE_VERSION}_linux_amd64
curl -sLov "${GOPATH_BIN}/kustomize" https://github.com/kubernetes-sigs/kustomize/releases/download/v${MINIMUM_KUSTOMIZE_VERSION}/kustomize_${MINIMUM_KUSTOMIZE_VERSION}_linux_amd64
chmod +x "${GOPATH_BIN}/kustomize"
else
echo "Missing required binary in path: kustomize"
Expand Down

0 comments on commit be0e399

Please sign in to comment.