Skip to content

Commit

Permalink
Update composer-post-install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey committed Nov 18, 2024
1 parent 07c7e8a commit 6e33720
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/composer-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 6e33720

Please sign in to comment.