Skip to content

Commit c82f909

Browse files
committed
#754 Use variable to point to thehelm docs templates
Jumping around with relative dirs is very brittle. Better pattern is to define a variable with absolute location and references this. Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
1 parent 0e275ec commit c82f909

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎Makefile‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
PROJECT_DIR = $(shell pwd)
66
SCANNERS_DIR = $(PROJECT_DIR)/scanners
7+
HELM_DOCS_DIR = $(PROJECT_DIR)/.helm-docs
78

89
SCANNERS_CHART_LIST := $(sort $(wildcard $(SCANNERS_DIR)/*/Chart.yaml))
910

@@ -86,21 +87,21 @@ scanner-docs:
8687
echo "Docs Folder found at: $${dir}/docs"; \
8788
if [ -d "parser" ]; then \
8889
echo "Parser found at: $${dir}/parser"; \
89-
helm-docs --template-files=./../../.helm-docs/templates.gotmpl \
90+
helm-docs --template-files=$(HELM_DOCS_DIR)/templates.gotmpl \
9091
--template-files=.helm-docs.gotmpl \
91-
--template-files=./../../.helm-docs/README.DockerHub-Parser.md.gotmpl \
92+
--template-files=$(HELM_DOCS_DIR)/README.DockerHub-Parser.md.gotmpl \
9293
--output-file=docs/README.DockerHub-Parser.md; \
9394
fi; \
9495
if [ -d "scanner" ]; then \
9596
echo "Scanner found at: $${dir}/parser"; \
96-
helm-docs --template-files=./../../.helm-docs/templates.gotmpl \
97+
helm-docs --template-files=$(HELM_DOCS_DIR)/templates.gotmpl \
9798
--template-files=.helm-docs.gotmpl \
98-
--template-files=./../../.helm-docs/README.DockerHub-Scanner.md.gotmpl \
99+
--template-files=$(HELM_DOCS_DIR)/README.DockerHub-Scanner.md.gotmpl \
99100
--output-file=docs/README.DockerHub-Scanner.md; \
100101
fi; \
101-
helm-docs --template-files=./../../.helm-docs/templates.gotmpl \
102+
helm-docs --template-files=$(HELM_DOCS_DIR)/templates.gotmpl \
102103
--template-files=.helm-docs.gotmpl \
103-
--template-files=./../../.helm-docs/README.ArtifactHub.md.gotmpl \
104+
--template-files=$(HELM_DOCS_DIR)/README.ArtifactHub.md.gotmpl \
104105
--output-file=docs/README.ArtifactHub.md; \
105106
else \
106107
echo "Ignoring Docs creation process for Chart $$dir, because no `docs` folder found at: $${dir}/docs"; \

0 commit comments

Comments
 (0)