-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #606 from viccuad/crd-ref-docs
deps: Pin crd-ref-docs binary with new `make crd-ref-docs` target
- Loading branch information
Showing
1 changed file
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |