Skip to content

Commit

Permalink
Enhance the makefile target check to skip CRDs that are new
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Jan 3, 2025
1 parent c4ee548 commit 800c854
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions catalogd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,15 @@ verify: tidy fmt vet generate ## Verify the current code generation and lint

.PHONY: verify-crd-compatibility
CRD_DIFF_ORIGINAL_REF := main
CRD_DIFF_UPDATED_SOURCE := file://config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
CRD_DIFF_CONFIG := crd-diff-config.yaml
verify-crd-compatibility: $(CRD_DIFF)
$(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}
@if git show ${CRD_DIFF_ORIGINAL_REF}:${CRD_PATH} > /dev/null 2>&1; then \
echo "Running CRD diff for ${CRD_PATH}..."; \
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "git://${CRD_DIFF_ORIGINAL_REF}?path=${CRD_PATH}" "file://${CRD_PATH}"; \
else \
echo "Skipping CRD diff check for ${CRD_PATH} as it is new."; \
fi


.PHONY: lint
lint: $(GOLANGCI_LINT) ## Run golangci linter.
Expand Down

0 comments on commit 800c854

Please sign in to comment.