From 5d16a1594fc86df993cdbe4a5562b2060e3bf30d Mon Sep 17 00:00:00 2001 From: tbradsha <32492176+tbradsha@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:36:13 -0700 Subject: [PATCH] Update setup-wordpress-env.sh --- .github/files/setup-wordpress-env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/files/setup-wordpress-env.sh b/.github/files/setup-wordpress-env.sh index 68116cff2876d..4d0f904380569 100755 --- a/.github/files/setup-wordpress-env.sh +++ b/.github/files/setup-wordpress-env.sh @@ -49,12 +49,12 @@ EXIT=0 for PLUGIN in projects/plugins/*/composer.json; do DIR="${PLUGIN%/composer.json}" NAME="$(basename "$DIR")" - - echo "::group::Installing plugin $NAME into WordPress" - if [[ $NAME != 'jetpack' || $NAME != 'wpcomsh' ]]; then + if [[ $NAME != 'jetpack' && $NAME != 'wpcomsh' ]]; then continue; fi + echo "::group::Installing plugin $NAME into WordPress" + if php -r 'exit( preg_match( "/^>=\\s*(\\d+\\.\\d+)$/", $argv[1], $m ) && version_compare( PHP_VERSION, $m[1], "<" ) ? 0 : 1 );' "$( jq -r '.require.php // ""' "$DIR/composer.json" )"; then echo "::endgroup::" echo "Skipping install of plugin $NAME, requires PHP $( jq -r '.require.php // ""' "$DIR/composer.json" )"