@@ -107,9 +107,8 @@ docs-clean:
107107 rm -r docs_build
108108
109109.PHONY : docs-examples
110- docs-kustomize-examples : export KUSTOMIZE_VERSION=v5.0.1
111- docs-kustomize-examples : yq kustomize # # Generate updated docs from examples using kustomize
112- KUSTOMIZE=$(KUSTOMIZE ) LOCALBIN=$(LOCALBIN ) ./docs/kustomize_to_docs.sh
110+ docs-kustomize-examples : oc yq # # Generate updated docs from examples using kustomize
111+ LOCALBIN=$(LOCALBIN ) ./docs/kustomize_to_docs.sh
113112
114113# #@ General
115114
@@ -276,6 +275,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.11.1
276275CRD_MARKDOWN_VERSION ?= v0.0.3
277276KUTTL_VERSION ?= 0.17.0
278277GOTOOLCHAIN_VERSION ?= go1.21.0
278+ OC_VERSION ?= 4.14.0
279279
280280KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
281281.PHONY : kustomize
@@ -369,11 +369,17 @@ endif
369369endif
370370
371371.PHONY : yq
372- yq : # # Download and install yq in local env
372+ yq : $( LOCALBIN ) # # Download and install yq in local env
373373 test -s $(LOCALBIN ) /yq || ( cd $( LOCALBIN) && \
374374 wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64.tar.gz -O - | \
375375 tar xz && mv yq_linux_amd64 $(LOCALBIN ) /yq )
376376
377+ .PHONY : oc
378+ oc : $(LOCALBIN ) # # Download and install oc in local env
379+ test -s $(LOCALBIN ) /oc || ( cd $( LOCALBIN) && \
380+ wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$(OC_VERSION ) /openshift-client-linux-$(OC_VERSION ) .tar.gz -O - | \
381+ tar xz)
382+
377383# Build make variables to export for shell
378384MAKE_ENV := $(shell echo '$(.VARIABLES ) ' | awk -v RS=' ' '/^(IMAGE) |.*?(REGISTRY)$$/')
379385SHELL_EXPORT = $(foreach v,$(MAKE_ENV ) ,$(v ) ='$($(v ) ) ')
0 commit comments