KubeZero/scripts/update_helm.sh

26 lines
590 B
Bash
Raw Normal View History

2020-11-30 12:13:52 +00:00
#!/bin/bash
set -eux
CHARTS=${1:-'.*'}
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
for dir in $(find -L $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
do
name=$(basename $dir)
[[ $name =~ $CHARTS ]] || continue
if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ]
then
echo "Processing chart dependencies"
rm -rf $dir/tmpcharts
2021-01-11 20:41:12 +00:00
rm -rf $dir/charts/*.tgz
2020-11-30 12:13:52 +00:00
helm dependency update --skip-refresh $dir
fi
echo "Processing $dir"
helm lint $dir && helm --debug package $dir
2021-11-27 13:02:23 +00:00
echo "Updating README"
helm-docs -c $dir
2020-11-30 12:13:52 +00:00
done