2020-11-30 12:13:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
CHARTS=${1:-'.*'}
|
|
|
|
|
|
|
|
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
|
2022-12-15 21:51:31 +00:00
|
|
|
helm repo update
|
|
|
|
|
2020-11-30 12:13:52 +00:00
|
|
|
for dir in $(find -L $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
|
|
|
|
do
|
|
|
|
name=$(basename $dir)
|
|
|
|
[[ $name =~ $CHARTS ]] || continue
|
2022-12-15 21:51:31 +00:00
|
|
|
|
|
|
|
if [ -x $dir/update.sh ]; then
|
|
|
|
{ cd $dir && ./update.sh; }
|
|
|
|
else
|
|
|
|
if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ]
|
|
|
|
then
|
|
|
|
echo "Processing chart dependencies"
|
|
|
|
rm -rf $dir/tmpcharts
|
|
|
|
rm -rf $dir/charts/*.tgz
|
|
|
|
helm dependency update --skip-refresh $dir
|
|
|
|
fi
|
2020-11-30 12:13:52 +00:00
|
|
|
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
|