File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111helm repo update
1212
1313
14- JQ_CMD=' "\(.Releases[0].AppVersion) \(.Releases[0].Status)"'
14+ JQ_CMD=' "\(.Releases[0].AppVersion), \(.Releases[0].Status)"'
1515LINE=" $( helm ls --all " ^$NAME \$ " --output json | jq -r " $JQ_CMD " ) "
16- INSTALLED_VERSION=$( echo $LINE | awk ' {print $1} ' )
17- STATUS=$( echo $LINE | awk ' {print $2} ' )
16+ INSTALLED_VERSION=$( echo $LINE | cut -f1 -d, )
17+ STATUS=$( echo $LINE | cut -f2 -d, )
1818
1919if [ -e /config/values.yaml ]; then
2020 VALUES=" --values /config/values.yaml"
@@ -24,11 +24,12 @@ if [ "$1" = "delete" ]; then
2424 if [ -z " $INSTALLED_VERSION " ]; then
2525 exit
2626 fi
27+ helm delete $NAME || true
2728 helm " $@ "
2829 exit
2930fi
3031
31- if [ -z " $INSTALLED_VERSION " ]; then
32+ if [ -z " $INSTALLED_VERSION " ] && [ -z " $STATUS " ] ; then
3233 helm " $@ " $VALUES
3334 exit
3435fi
You can’t perform that action at this time.
0 commit comments