diff --git a/scripts/helm-docs.sh b/scripts/helm-docs.sh index dd5ed058d..d7e282400 100755 --- a/scripts/helm-docs.sh +++ b/scripts/helm-docs.sh @@ -1,12 +1,16 @@ #!/bin/bash ## Reference: https://github.com/norwoodj/helm-docs -set -eux -CHART_DIR="$(cd "$(dirname "$0")/.." && pwd)" -echo "$CHART_DIR" +set -x +REPO_ROOT="${1:-$(cd "$(dirname "$0")/.." && pwd)}" +WORKDIR="${2}" + +echo "$REPO_ROOT" +echo "$WORKDIR" echo "Running Helm-Docs" docker run \ - -v "$CHART_DIR:/helm-docs" \ + -v "$REPO_ROOT:/helm-docs" \ + -w "/helm-docs/$WORKDIR" \ -u $(id -u) \ --rm \ jnorwood/helm-docs:v1.9.1