From 53f91667836c679875286619eba639541f1365d6 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 18 Mar 2021 11:48:27 -0400 Subject: [PATCH] fix: add flag for stable/incubator --- hack/gen-helm-docs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hack/gen-helm-docs.sh b/hack/gen-helm-docs.sh index 1c96d4ba..09b0578f 100755 --- a/hack/gen-helm-docs.sh +++ b/hack/gen-helm-docs.sh @@ -2,7 +2,7 @@ set -eu # Generate helm-docs for Helm charts -# Usage ./gen-helm-docs.sh [chart] +# Usage ./gen-helm-docs.sh [stable/incubator] [chart] # require helm-docs command -v helm-docs >/dev/null 2>&1 || { @@ -19,11 +19,11 @@ readme_config_template="${repository}/hack/templates/README_CONFIG.md.gotmpl" readme_changelog_template="${repository}/hack/templates/README_CHANGELOG.md.gotmpl" # Gather all charts using the common library, excluding common-test -charts=$(find "${repository}" -name "Chart.yaml" -exec grep --exclude="*common-test*" -l "\- name\: common" {} \;) +charts=$(find "${repository}" -name "Chart.yaml") # Allow for a specific chart to be passed in as a argument -if [ $# -ge 1 ] && [ -n "$1" ]; then - charts="${repository}/charts/$1/Chart.yaml" +if [ $# -ge 1 ] && [ -n "$1" ] && [ -n "$2" ]; then + charts="${repository}/charts/$1/$2/Chart.yaml" root="$(dirname "${charts}")" if [ ! -f "$charts" ]; then echo "File ${charts} does not exist."