Skip to content

Commit c41359f

Browse files
authored
build: Add 'chart-docs' make target (#727)
**What problem does this PR solve?**: Previously, the chart docs could only be updated by running pre-commit. Now they can be updated by running `make chart-docs`. (Pre-commit now uses this make target as well). **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent 03191dd commit c41359f

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ repos:
1010
language: system
1111
files: "(.*\\.go|go.mod|go.sum|go.mk)$"
1212
pass_filenames: false
13+
- id: chart-docs
14+
name: chart-docs
15+
entry: make chart-docs
16+
language: system
17+
files: "^charts/"
18+
pass_filenames: false
1319
- id: hugo-mod-tidy
1420
name: hugo-mod-tidy
1521
entry: bash -c "cd docs && hugo mod tidy"
@@ -145,11 +151,3 @@ repos:
145151
- --comment-style
146152
- <!--|| -->
147153
- --allow-past-years
148-
- repo: https://github.com/norwoodj/helm-docs
149-
rev: v1.13.1
150-
hooks:
151-
- id: helm-docs
152-
stages: [commit]
153-
args:
154-
# Make the tool search for charts only under the `example-charts` directory
155-
- --chart-search-root=charts

make/helm.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Copyright 2023 Nutanix. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
.PHONY: chart-docs
5+
chart-docs: ## Update helm chart docs
6+
chart-docs:
7+
helm-docs --chart-search-root=charts
8+
49
.PHONY: lint-chart
510
lint-chart: ## Lints helm chart
611
lint-chart:

0 commit comments

Comments
 (0)