Skip to content

Commit

Permalink
ADD common_README_with_helm-docs.sh: README for common chart needs sp…
Browse files Browse the repository at this point in the history
…ecial treatment and gets its own script...
  • Loading branch information
Johannes Kastl committed Apr 15, 2023
1 parent 3ebaf7d commit 1d4b841
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions common_README_with_helm-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/bash
set -eu

# Generate helm-docs for the common library chart
# Usage ./common_README_with_helm-docs.sh

if [ $# -gt 0 ]
then
echo "Please use this script without arguments"
echo "Usage: ./common_README_with_helm-docs.sh"
exit 1
fi

# require helm-docs
command -v helm-docs >/dev/null 2>&1 || {
echo >&2 "helm-docs (https://github.com/k8s-at-home/helm-docs) is not installed. Aborting."
exit 1
}

# Templates to use for README generation
readme_template="README.md.gotmpl"
readme_config_template="README_CONFIG.md.gotmpl"
readme_changelog_template="README_CHANGELOG.md.gotmpl"

root="charts/common/"

# Run helm-docs for charts
# 20230405 use binary from k8s-at-home fork
helm-docs-k8s-at-home \
--ignore-file="/dev/null" \
--template-files="${readme_template}" \
--template-files="${readme_config_template}" \
--template-files="${readme_changelog_template}" \
--chart-search-root="${root}"

0 comments on commit 1d4b841

Please sign in to comment.