forked from kyverno/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (34 loc) · 1.36 KB
/
Makefile
File metadata and controls
41 lines (34 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
###########
# CODEGEN #
###########
.PHONY: codegen-cli-docs
codegen-cli-docs: ## Build CLI docs
@rm -rf ./src/content/docs/docs/kyverno-cli/reference/kyverno*.md
@docker run --user root -v ${PWD}:/work --rm ghcr.io/kyverno/kyverno-cli docs \
--autogenTag=false \
--website \
--noDate \
--markdownLinks \
--output "/work/content/docs/docs/kyverno-cli/reference"
.PHONY: codegen-policies
codegen-policies: ## Render policies
@rm -rf ./src/content/docs/policies/*/
@cd render && go run . -- https://github.com/kyverno/policies/main ../src/content/docs/policies/
.PHONY: codegen
codegen: ## Rebuild all generated code and docs
codegen: codegen-policies
codegen: codegen-cli-docs
.PHONY: verify-codegen
verify-codegen: ## Verify all generated code and docs are up to date
verify-codegen: codegen
@echo Checking codegen is up to date... >&2
@git --no-pager diff -- .
@echo 'If this test fails, it is because the git diff is non-empty after running "make codegen".' >&2
@echo 'To correct this, locally run "make codegen", commit the changes, and re-run tests.' >&2
@git diff --quiet --exit-code -- .
########
# HELP #
########
.PHONY: help
help: ## Shows the available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}'