Fix deployments when versions are missing
This commit is contained in:
parent
16c91fedd1
commit
bc0ef0d6fc
6
abra
6
abra
@ -504,6 +504,7 @@ output_version_summary() {
|
|||||||
|
|
||||||
CONSENT_TO_UPDATE=$abra___update
|
CONSENT_TO_UPDATE=$abra___update
|
||||||
IS_AN_UPDATE="false"
|
IS_AN_UPDATE="false"
|
||||||
|
UNABLE_TO_DETECT="false"
|
||||||
|
|
||||||
IFS=':' read -ra COMPOSE_FILES <<< "$COMPOSE_FILE"
|
IFS=':' read -ra COMPOSE_FILES <<< "$COMPOSE_FILE"
|
||||||
for COMPOSE in "${COMPOSE_FILES[@]}"; do
|
for COMPOSE in "${COMPOSE_FILES[@]}"; do
|
||||||
@ -534,6 +535,7 @@ output_version_summary() {
|
|||||||
|
|
||||||
else
|
else
|
||||||
warning "Unable to detect deployed version of ${STACK_NAME}_${SERVICE}, please proceed with caution"
|
warning "Unable to detect deployed version of ${STACK_NAME}_${SERVICE}, please proceed with caution"
|
||||||
|
UNABLE_TO_DETECT="true"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@ -541,9 +543,13 @@ output_version_summary() {
|
|||||||
if [[ $IS_AN_UPDATE == "true" ]]; then
|
if [[ $IS_AN_UPDATE == "true" ]]; then
|
||||||
require_consent_for_update
|
require_consent_for_update
|
||||||
else
|
else
|
||||||
|
# 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"
|
success "Nothing to deploy, you're on latest"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
###### FIXME 3wc: name this section
|
###### FIXME 3wc: name this section
|
||||||
|
Reference in New Issue
Block a user