File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,14 @@ verify: tidy fmt vet generate ## Verify the current code generation and lint
135135CRD_DIFF_ORIGINAL_REF := main
136136CRD_DIFF_UPDATED_SOURCE := file://config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
137137CRD_DIFF_CONFIG := crd-diff-config.yaml
138+
138139verify-crd-compatibility : $(CRD_DIFF )
139- $(CRD_DIFF ) --config=" ${CRD_DIFF_CONFIG} " " git://${CRD_DIFF_ORIGINAL_REF} ?path=config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml" ${CRD_DIFF_UPDATED_SOURCE}
140+ @if git show ${CRD_DIFF_ORIGINAL_REF} :config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml > /dev/null 2>&1 ; then \
141+ echo " Running CRD diff..." ; \
142+ $(CRD_DIFF ) --config=" ${CRD_DIFF_CONFIG} " " git://${CRD_DIFF_ORIGINAL_REF} ?path=config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml" ${CRD_DIFF_UPDATED_SOURCE} ; \
143+ else \
144+ echo " Skipping CRD diff: CRD does not exist in ${CRD_DIFF_ORIGINAL_REF} " ; \
145+ fi
140146
141147.PHONY : lint
142148lint : $(GOLANGCI_LINT ) # # Run golangci linter.
You can’t perform that action at this time.
0 commit comments