Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generate CRD Documentation #1342 #1727

Merged
merged 15 commits into from
Feb 22, 2023
Prev Previous commit
Next Next commit
Changes in makefile
Added a new target for creating on crd documentaion called as crd_docs and also added new command for it which is run inside the container image build

Signed-off-by: Kartik-Garg <kartikgarg938@gmail.com>
Kartik-Garg committed Feb 22, 2023
commit 3c2173e955f32631e9374395e43e9723d0fd87c8
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -199,10 +199,27 @@ ifeq ($(DOCKER_BUILD),"true")
-w /repo \
$(DOCS_BUILD_IMAGE) \
/bin/bash -c $(DOCS_CMD)
@$(MAKE) run CMD='-c "./template/gen-crd-api-reference-docs -config template/example-config.json -api-dir ./pkg/apis/cr/v1alpha1 -out-file API.md"'
else
@/bin/bash -c $(DOCS_CMD)
@$(MAKE) run CMD='-c "./template/gen-crd-api-reference-docs -config template/example-config.json -api-dir ./pkg/apis/cr/v1alpha1 -out-file API.md"'
endif

API_DOCS_CMD = "gen-crd-api-reference-docs \
-config /usr/local/bin/example-config.json \
-api-dir ./pkg/apis/cr/v1alpha1 \
-out-file API.md \
"
Kartik-Garg marked this conversation as resolved.
Show resolved Hide resolved
crd_docs:
ifeq ($(DOCKER_BUILD),"true")
@echo "running API_DOCS_CMD in the containerized build environment"
@docker run \
--entrypoint '' \
--rm \
-v "$(PWD):/repo" \
-w /repo \
$(BUILD_IMAGE) \
/bin/bash -c $(API_DOCS_CMD)
else
@/bin/bash -c $(API_DOCS_CMD)
endif

build-dirs: