From 32cbe9378e778059bc21b46a7f83baca0fff11b4 Mon Sep 17 00:00:00 2001 From: benjamin Date: Fri, 20 Sep 2024 01:45:37 +0100 Subject: [PATCH] check UF in civicrm-upgrade-test, use standalone snapshot library if standalone --- bin/civicrm-upgrade-test | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/civicrm-upgrade-test b/bin/civicrm-upgrade-test index e3cdbdd..a5993d6 100755 --- a/bin/civicrm-upgrade-test +++ b/bin/civicrm-upgrade-test @@ -125,8 +125,15 @@ while [ -n "$1" ]; do esac done +CIVICRM_UF=$( cv --cwd="$WEB_ROOT" ev 'echo CIVICRM_UF;' ) + echo "Identify files: [$DATABASE_EXPRS]" -DATABASE_FILES=$(eval php "$SCRIPT_DIR/civicrm-upgrade-examples" $DATABASE_EXPRS) +if [[ "$CIVICRM_UF" == "Standalone" ]]; then + echo "Using 'databases_standalone' snapshot library for Standalone" + DATABASE_FILES=$(eval php "$SCRIPT_DIR/civicrm-upgrade-examples" --snapshot-library databases_standalone $DATABASE_EXPRS) +else + DATABASE_FILES=$(eval php "$SCRIPT_DIR/civicrm-upgrade-examples" $DATABASE_EXPRS) +fi if [ $? -ne 0 ]; then echo "Failed to evaluate expression \"$1\" => $DATABASE_FILES" >> /dev/stderr exit 1