Fix deployments when versions are missing

This commit is contained in:
decentral1se 2021-03-16 07:32:31 +01:00
parent 16c91fedd1
commit bc0ef0d6fc
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A

10
abra
View File

@ -504,6 +504,7 @@ output_version_summary() {
CONSENT_TO_UPDATE=$abra___update
IS_AN_UPDATE="false"
UNABLE_TO_DETECT="false"
IFS=':' read -ra COMPOSE_FILES <<< "$COMPOSE_FILE"
for COMPOSE in "${COMPOSE_FILES[@]}"; do
@ -534,6 +535,7 @@ output_version_summary() {
else
warning "Unable to detect deployed version of ${STACK_NAME}_${SERVICE}, please proceed with caution"
UNABLE_TO_DETECT="true"
fi
done
done
@ -541,8 +543,12 @@ output_version_summary() {
if [[ $IS_AN_UPDATE == "true" ]]; then
require_consent_for_update
else
success "Nothing to deploy, you're on latest"
exit 0
# Note(decentral1se): in the cases where we couldn't detect a version we
# shouldn't block an update and the end-user can still make progress
if [[ ! $UNABLE_TO_DETECT == "true" ]]; then
success "Nothing to deploy, you're on latest"
exit 0
fi
fi
}