@@ -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
@@ -270,6 +269,7 @@ CONTROLLER_TOOLS_VERSION ?= v0.11.1
270269CRD_MARKDOWN_VERSION ?= v0.0.3
271270KUTTL_VERSION ?= 0.17.0
272271GOTOOLCHAIN_VERSION ?= go1.21.0
272+ OC_VERSION ?= 4.14.0
273273
274274KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
275275.PHONY : kustomize
@@ -363,11 +363,17 @@ endif
363363endif
364364
365365.PHONY : yq
366- yq : # # Download and install yq in local env
366+ yq : $( LOCALBIN ) # # Download and install yq in local env
367367 test -s $(LOCALBIN ) /yq || ( cd $( LOCALBIN) && \
368368 wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64.tar.gz -O - | \
369369 tar xz && mv yq_linux_amd64 $(LOCALBIN ) /yq )
370370
371+ .PHONY : oc
372+ oc : $(LOCALBIN ) # # Download and install oc in local env
373+ test -s $(LOCALBIN ) /oc || ( cd $( LOCALBIN) && \
374+ wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$(OC_VERSION ) /openshift-client-linux-$(OC_VERSION ) .tar.gz -O - | \
375+ tar xz)
376+
371377# Build make variables to export for shell
372378MAKE_ENV := $(shell echo '$(.VARIABLES ) ' | awk -v RS=' ' '/^(IMAGE) |.*?(REGISTRY)$$/')
373379SHELL_EXPORT = $(foreach v,$(MAKE_ENV ) ,$(v ) ='$($(v ) ) ')
0 commit comments