argocd-helm/scripts/publish.sh

23 lines
584 B
Bash
Raw Normal View History

2017-10-11 18:20:19 +00:00
#!/bin/bash
set -eux
2017-10-11 18:20:19 +00:00
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
2019-10-31 18:28:02 +00:00
GIT_PUSH=${GIT_PUSH:-false}
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 $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d);
2017-10-11 18:20:19 +00:00
do
echo "Processing $dir"
2019-09-24 20:55:12 +00:00
helm package $dir
2017-10-11 18:20:19 +00:00
done
cp $SRCROOT/*.tgz output/
2019-09-24 20:55:12 +00:00
cd $SRCROOT/output && helm repo index .
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