From 6e3372033cc7bb1cfeb00fa2e88a9fd9675dded1 Mon Sep 17 00:00:00 2001 From: EarthlingDavey <15802017+EarthlingDavey@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:32:41 +0000 Subject: [PATCH] Update composer-post-install.sh --- bin/composer-post-install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/composer-post-install.sh b/bin/composer-post-install.sh index 8d5109e0c..d4559e7d4 100755 --- a/bin/composer-post-install.sh +++ b/bin/composer-post-install.sh @@ -82,7 +82,7 @@ fi # Plugin version check. ELASTIC_PRESS_TARGET_PACKAGE="wpackagist-plugin/elasticpress" -ELASTIC_PRESS_TARGET_VERSION="5.1.3" +ELASTIC_PRESS_TARGET_VERSION="5.1.4" ELASTIC_PRESS_INSTALLED_VERSION=$(get_installed_version $ELASTIC_PRESS_TARGET_PACKAGE) # Variables for the find and replace. ELASTIC_PRESS_FILE=/var/www/html/public/app/mu-plugins/elasticpress/includes/classes/Indexable/Post/SyncManager.php @@ -93,4 +93,7 @@ ELASTIC_PRESS_REPLACE="\t\$indexable->get( \$post_id ) \&\& \$this->action_delet if [ "$ELASTIC_PRESS_INSTALLED_VERSION" = "$ELASTIC_PRESS_TARGET_VERSION" ] ; then echo "Fixing warning in elasticpress. Checking for doc before deleting prevents 404s in logs..." sed -i "s/$ELASTIC_PRESS_SEARCH/$ELASTIC_PRESS_REPLACE/g" $ELASTIC_PRESS_FILE +else + echo "Elasticpress target version is not installed - review composer-post-install.sh." + exit 1; fi