Move docs script to root of repo
This makes it easier for contributors to ensure docs are updated by having the script more easy at hand. Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPTPATH=$(dirname "$0")
|
||||
HELM_DOCS_VERSION="1.11.0"
|
||||
|
||||
case "$(uname -s)" in
|
||||
Linux*)
|
||||
machine=Linux
|
||||
shasum=sha256sum
|
||||
exe=helm-docs
|
||||
;;
|
||||
Darwin*)
|
||||
machine=Darwin
|
||||
shasum=shasum
|
||||
exe=helm-docs
|
||||
;;
|
||||
MINGW64*)
|
||||
machine=Windows
|
||||
shasum=sha256sum
|
||||
exe=helm-docs.exe
|
||||
;;
|
||||
esac
|
||||
|
||||
function install_helm_docs {
|
||||
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 ${exe}
|
||||
mv ${exe} "$SCRIPTPATH/bin/"
|
||||
rm helm-docs_"${HELM_DOCS_VERSION}"_${machine}_x86_64.tar.gz
|
||||
}
|
||||
|
||||
if [ ! -f "$SCRIPTPATH/bin/${exe}" ] ; then
|
||||
install_helm_docs
|
||||
elif [[ ! "$("$SCRIPTPATH/bin/${exe}" --version)" =~ .*"$HELM_DOCS_VERSION".* ]] ; then
|
||||
install_helm_docs
|
||||
else
|
||||
echo "Using '$("$SCRIPTPATH/bin/${exe}" --version)'"
|
||||
fi
|
||||
|
||||
# validate docs
|
||||
"$SCRIPTPATH/bin/${exe}"
|
||||
git diff --exit-code
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
paths:
|
||||
- 'charts/**'
|
||||
- '.github/workflows/helm-chart-ci.yml'
|
||||
- '.github/scripts/*.sh'
|
||||
- 'helm-docs.sh'
|
||||
- '.github/kind/conf/kind-config.yaml'
|
||||
|
||||
concurrency:
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
uses: actions/[email protected]
|
||||
|
||||
- name: Verify Docs updated
|
||||
run: .github/scripts/helm-docs.sh
|
||||
run: ./helm-docs.sh
|
||||
|
||||
lint-chart:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
Reference in New Issue
Block a user