better update handler

This commit is contained in:
Heavybullets8 2022-08-09 22:47:59 -06:00
parent 1c0e223648
commit 51a5e5fcc2

View File

@ -134,14 +134,19 @@ update(){
count=0
while [[ $count -lt 3 ]]
do
updated=$(grep "^$app_name," temp.txt | awk -F ',' '{print $3}')
if cli -c 'app chart_release upgrade release_name=''"'"$app_name"'"' &> /dev/null || [[ $updated == "false" ]]; then
break
elif [[ $count -lt 3 ]]; then
update_avail=$(grep "^$app_name," temp.txt | awk -F ',' '{print $3}')
if [[ $update_avail == "true" ]]; then
if ! cli -c 'app chart_release upgrade release_name=''"'"$app_name"'"' &> /dev/null ; then
sleep 6
((count++))
sleep 5
continue
fi
break
elif [[ $update_avail == "false" ]]; then
break
else
return 1
((count++))
sleep 6
fi
done
}