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
|
||||
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,9 +543,13 @@ output_version_summary() {
|
||||
if [[ $IS_AN_UPDATE == "true" ]]; then
|
||||
require_consent_for_update
|
||||
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"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
###### FIXME 3wc: name this section
|
||||
|
Reference in New Issue
Block a user