better update handler
This commit is contained in:
parent
1c0e223648
commit
51a5e5fcc2
@ -134,14 +134,19 @@ update(){
|
|||||||
count=0
|
count=0
|
||||||
while [[ $count -lt 3 ]]
|
while [[ $count -lt 3 ]]
|
||||||
do
|
do
|
||||||
updated=$(grep "^$app_name," temp.txt | awk -F ',' '{print $3}')
|
update_avail=$(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
|
if [[ $update_avail == "true" ]]; then
|
||||||
|
if ! cli -c 'app chart_release upgrade release_name=''"'"$app_name"'"' &> /dev/null ; then
|
||||||
|
sleep 6
|
||||||
|
((count++))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
elif [[ $update_avail == "false" ]]; then
|
||||||
break
|
break
|
||||||
elif [[ $count -lt 3 ]]; then
|
|
||||||
((count++))
|
|
||||||
sleep 5
|
|
||||||
else
|
else
|
||||||
return 1
|
((count++))
|
||||||
|
sleep 6
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user