Skip to content

Commit

Permalink
fix: shell exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
swollner committed Aug 30, 2024
1 parent e5f9906 commit 430e78d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions archetypes/helm/src/main/resources/archetype-resources/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ popd >/dev/null || exit
diff() {
echo "Request diff from last revision, please wait ..."
echo ""
# temporarily disable the script from exiting on a non-zero status code
set +e
helm diff upgrade --install "${RELEASE}" "${CHART}" "${ARGS[@]}"
set -e
}

tryRun(){
Expand Down Expand Up @@ -262,14 +265,16 @@ runAsWizard() {
if [[ $WIZARD == "true" ]] ; then
runAsWizard
else
[[ $DIFF == "true" ]] && {
if [[ $DIFF == "true" ]] ; then
diff
}
[[ $TRY_RUN == "true" ]] && {
fi

if [[ $TRY_RUN == "true" ]] ; then
tryRun
}
fi

[[ $DEPLOY == "true" ]] && {
if [[ $DEPLOY == "true" ]] ; then
execute
}
fi

fi

0 comments on commit 430e78d

Please sign in to comment.