Skip to content

Commit 146df4d

Browse files
authored
Merge pull request #84 from numtide/change-crd-generation-trigger
2 parents b70e151 + 7b97cf2 commit 146df4d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/_reusable-manifests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
go-version-file: ./go.mod
1818

1919
- name: Verify manifests
20-
run: make verify
20+
run: make verify-warn

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,28 @@ verify: manifests generate ## Verify generated files are up to date
189189
}
190190
@echo "==> Verification passed!"
191191

192+
.PHONY: verify-warn
193+
verify-warn: manifests generate ## Verify generated files are up to date (non-blocking, warns only)
194+
@echo "==> Verifying generated files are committed"
195+
@if ! git diff --exit-code config/crd api/ >/dev/null 2>&1; then \
196+
echo ""; \
197+
echo "========================================"; \
198+
echo "WARNING: Generated files are out of date"; \
199+
echo "========================================"; \
200+
echo ""; \
201+
echo "The following files have changes:"; \
202+
git diff --stat config/crd api/; \
203+
echo ""; \
204+
echo "This is not blocking the build, but you should run"; \
205+
echo "'make manifests generate' and commit the changes"; \
206+
echo "before merging to ensure CRDs are synchronized."; \
207+
echo ""; \
208+
echo "========================================"; \
209+
exit 0; \
210+
else \
211+
echo "==> Verification passed!"; \
212+
fi
213+
192214
.PHONY: pre-commit
193215
pre-commit: modules-tidy fmt vet lint test ## Run full pre-commit checks (tidy, fmt, vet, lint, test)
194216
@echo "==> Pre-commit checks passed!"

0 commit comments

Comments
 (0)