From 427e2579ebce5aad994e0151dc8dc8faddcf32ee Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 12 Jun 2023 20:02:48 -0600 Subject: [PATCH] docs: remove the line generated by gen-crd-api-reference-docs removing the line added by gen-crd-api-reference-docs to avoid commit specification.md with only the reference to the git commit Signed-off-by: Javier (cherry picked from commit 9b3e5b10e774056cdd64811b56f515b2bffca2ea) --- Documentation/CRDs/specification.md | 3 +-- Documentation/gen-crd-api-reference-docs/template/pkg.tpl | 3 +-- build/crds/generate-crd-docs.sh | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/CRDs/specification.md b/Documentation/CRDs/specification.md index df17be2f2..849b9a79f 100644 --- a/Documentation/CRDs/specification.md +++ b/Documentation/CRDs/specification.md @@ -11053,6 +11053,5 @@ string

-Generated with gen-crd-api-reference-docs -on git commit ff431de56. +Generated with gen-crd-api-reference-docs.

diff --git a/Documentation/gen-crd-api-reference-docs/template/pkg.tpl b/Documentation/gen-crd-api-reference-docs/template/pkg.tpl index 842ec93d4..76f3b21a0 100644 --- a/Documentation/gen-crd-api-reference-docs/template/pkg.tpl +++ b/Documentation/gen-crd-api-reference-docs/template/pkg.tpl @@ -42,8 +42,7 @@ {{ end }}

- Generated with gen-crd-api-reference-docs - {{ with .gitCommit }} on git commit {{ . }}{{end}}. + Generated with gen-crd-api-reference-docs.

{{ end }} diff --git a/build/crds/generate-crd-docs.sh b/build/crds/generate-crd-docs.sh index 8b8245829..4a444aee9 100755 --- a/build/crds/generate-crd-docs.sh +++ b/build/crds/generate-crd-docs.sh @@ -3,6 +3,7 @@ SCRIPT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P) GEN_CRD_API_REFERENCE_DOC_VERSION=v0.3.0 SCRIPT_CHECK_DOCS_DIFF=$(git diff --name-only --diff-filter=M | grep -Ec '/types\.go$') +SPECIFICATION_FILE=Documentation/CRDs/specification.md install_generator() { go install github.com/ahmetb/gen-crd-api-reference-docs@${GEN_CRD_API_REFERENCE_DOC_VERSION} @@ -16,7 +17,7 @@ run_gen() { -config="${SCRIPT_ROOT}/crd-docs-config.json" \ -template-dir="${SCRIPT_ROOT}/Documentation/gen-crd-api-reference-docs/template" \ -api-dir="github.com/rook/rook/pkg/apis/ceph.rook.io" \ - -out-file="${SCRIPT_ROOT}/Documentation/CRDs/specification.md" + -out-file="${SCRIPT_ROOT}/$SPECIFICATION_FILE" fi }