-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marco Franssen <[email protected]>
- Loading branch information
1 parent
4d7ac9b
commit 4ee83bb
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
SCRIPTPATH=$(dirname "$0") | ||
HELM_DOCS_VERSION="1.11.0" | ||
|
||
function install_helm_docs { | ||
case "$(uname -s)" in | ||
Linux*) | ||
machine=Linux | ||
shasum=sha256sum | ||
;; | ||
Darwin*) | ||
machine=Darwin | ||
shasum=shasum | ||
;; | ||
esac | ||
|
||
curl -LO https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_${machine}_x86_64.tar.gz | ||
curl -L --output /tmp/checksums_helm-docs.txt https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/checksums.txt | ||
grep helm-docs_${HELM_DOCS_VERSION}_${machine}_x86_64.tar.gz /tmp/checksums_helm-docs.txt | $shasum -c - | ||
mkdir -p "$SCRIPTPATH/bin" | ||
tar -xf helm-docs_"${HELM_DOCS_VERSION}"_${machine}_x86_64.tar.gz helm-docs | ||
mv helm-docs "$SCRIPTPATH/bin/" | ||
rm helm-docs_"${HELM_DOCS_VERSION}"_${machine}_x86_64.tar.gz | ||
} | ||
|
||
if [ ! -f "$SCRIPTPATH/bin/helm-docs" ] ; then | ||
install_helm_docs | ||
elif [[ ! "$("$SCRIPTPATH/bin/helm-docs" --version)" =~ .*"$HELM_DOCS_VERSION".* ]] ; then | ||
install_helm_docs | ||
else | ||
echo "Using '$("$SCRIPTPATH/bin/helm-docs" --version)'" | ||
fi | ||
|
||
# validate docs | ||
"$SCRIPTPATH/bin/helm-docs" -t "$SCRIPTPATH/README.md.tmpl" -g $1 | ||
git diff --exit-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ charts/*/Chart.lock | |
|
||
# Vim swap files | ||
*.swp | ||
|
||
.github/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters