Codegen/CI: Update makefile to also verify gen-cue (#113211)

* update makefile to also verify gen-cue

* update for jsonnet
This commit is contained in:
Oscar Kilhed
2025-10-30 15:31:57 +01:00
committed by GitHub
parent 63c5d8cb8f
commit 1342858f36
+28 -2
View File
@@ -150,7 +150,19 @@ i18n-extract: i18n-extract-enterprise
##@ Building
.PHONY: gen-cue
gen-cue: ## Do all CUE/Thema code generation
gen-cue: do-gen-cue
@if [ -n "$$CODEGEN_VERIFY" ]; then \
echo "Verifying generated code is up to date..."; \
if ! git diff --quiet; then \
echo "Error: Generated cue files are not up to date. Please run 'make gen-cue' to regenerate."; \
git diff --name-only; \
exit 1; \
fi; \
echo "Generated cue files are up to date."; \
fi
.PHONY: do-gen-cue
do-gen-cue: ## Do all CUE/Thema code generation
@echo "generate code from .cue files"
go generate ./kinds/gen.go
go generate ./public/app/plugins/gen.go
@@ -223,10 +235,24 @@ fix-cue:
$(cue) fix kinds/**/*.cue
$(cue) fix public/app/plugins/**/**/*.cue
.PHONY: gen-jsonnet
gen-jsonnet:
gen-jsonnet: do-gen-jsonnet
@if [ -n "$$CODEGEN_VERIFY" ]; then \
echo "Verifying generated code is up to date..."; \
if ! git diff --quiet; then \
echo "Error: Generated jsonnet files are not up to date. Please run 'make gen-jsonnet' to regenerate."; \
git diff --name-only; \
exit 1; \
fi; \
echo "Generated jsonnet files are up to date."; \
fi
.PHONY: do-gen-jsonnet
do-gen-jsonnet:
go generate ./devenv/jsonnet
.PHONY: update-workspace
update-workspace: gen-go
@echo "updating workspace"