2017-10-11 18:20:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
2019-09-12 20:13:51 +00:00
|
|
|
GIT_PUSH=${GIT_PUSH:-true}
|
2017-10-11 18:20:19 +00:00
|
|
|
|
2018-09-03 14:23:49 +00:00
|
|
|
rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output
|
2017-10-11 18:20:19 +00:00
|
|
|
|
|
|
|
for dir in $SRCROOT/charts/*;
|
|
|
|
do
|
|
|
|
echo "Processing $dir"
|
|
|
|
version=$(cat $dir/Chart.yaml | grep version: | awk '{print $2}')
|
2017-10-11 20:25:53 +00:00
|
|
|
tar -cvzf $SRCROOT/output/$(basename $dir)-$version.tgz -C $dir .
|
2017-10-11 18:20:19 +00:00
|
|
|
cd $SRCROOT/output && helm repo index .
|
|
|
|
done
|
2018-09-03 14:23:49 +00:00
|
|
|
|
|
|
|
cd $SRCROOT/output && git status
|
|
|
|
|
|
|
|
if [ "$GIT_PUSH" == "true" ]
|
|
|
|
then
|
|
|
|
cd $SRCROOT/output && git add . && git commit -m "Publish charts" && git push git@github.com:argoproj/argo-helm.git gh-pages
|
|
|
|
fi
|