Fix deployments when versions are missing
This commit is contained in:
parent
16c91fedd1
commit
bc0ef0d6fc
10
abra
10
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,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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user