argocd-helm/scripts/publish.sh

22 lines
513 B
Bash
Raw Normal View History

2017-10-11 11:20:19 -07:00
#!/bin/bash
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
2019-09-12 13:13:51 -07:00
GIT_PUSH=${GIT_PUSH:-true}
2017-10-11 11:20:19 -07:00
2018-09-03 07:23:49 -07:00
rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output
2017-10-11 11:20:19 -07:00
2019-09-25 11:56:33 -07:00
cd $SRCROOT/charts
for dir in *;
2017-10-11 11:20:19 -07:00
do
echo "Processing $dir"
2019-09-24 13:55:12 -07:00
helm package $dir
2017-10-11 11:20:19 -07:00
done
2019-09-24 13:55:12 -07:00
cd $SRCROOT/output && helm repo index .
2018-09-03 07:23:49 -07: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