argo-helm/scripts/publish.sh

22 lines
513 B
Bash
Executable File

#!/bin/bash
SRCROOT="$(cd "$(dirname "$0")/.." && pwd)"
GIT_PUSH=${GIT_PUSH:-true}
rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output
cd $SRCROOT/charts
for dir in *;
do
echo "Processing $dir"
helm package $dir
done
cd $SRCROOT/output && helm repo index .
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