Skip to content

Commit

Permalink
Merge pull request #606 from viccuad/crd-ref-docs
Browse files Browse the repository at this point in the history
deps: Pin crd-ref-docs binary with new `make crd-ref-docs` target
  • Loading branch information
viccuad authored Jan 9, 2024
2 parents 88d35b2 + 3edfbb7 commit 005d3ca
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/crds/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
BIN_DIR := $(abspath $(ROOT_DIR)/bin)

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif

CRD_REF_DOCS_VER := v0.0.9
CRD_REF_DOCS_BIN := crd-ref-docs
CRD_REF_DOCS := $(BIN_DIR)/$(CRD_REF_DOCS_BIN)

crd-ref-docs: $(CRD_REF_DOCS)

$(CRD_REF_DOCS): ## Install crd-ref-docs
GOBIN=$(BIN_DIR) go install github.com/elastic/crd-ref-docs@$(CRD_REF_DOCS_VER)

.PHONY: generate
generate:
crd-ref-docs --config=config.yml --renderer=markdown --source-path=../../pkg/apis --output-path=CRD-docs-for-docs-repo.md
$(CRD_REF_DOCS) --log-level INFO --config=config.yml --renderer=markdown --source-path=../../pkg/apis --output-path=CRD-docs-for-docs-repo.md

0 comments on commit 005d3ca

Please sign in to comment.