From eb650598da92297ad0035d9caf6f8d6ecc315727 Mon Sep 17 00:00:00 2001 From: Jorge M Date: Thu, 26 Sep 2024 14:36:09 +0200 Subject: [PATCH] Symlink WC for PHP unit tests --- bin/unit-tests-functions.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/unit-tests-functions.sh b/bin/unit-tests-functions.sh index a34115b5..5119d0ff 100755 --- a/bin/unit-tests-functions.sh +++ b/bin/unit-tests-functions.sh @@ -230,13 +230,12 @@ install_wc() { local WC_VERSION_FILE="${WC_DIR}/version-"$(echo $WC_VERSION | sed -e "s/\//-/") if [ ! -f "$WC_VERSION_FILE" ]; then rm -rf "$WC_DIR" - mkdir -p "$WC_DIR" echo "Installing WooCommerce ($WC_VERSION)." local WC_TMPDIR="${TMPDIR}/woocommerce-${WC_VERSION}" rm -rf "${WC_TMPDIR}" git clone --quiet --depth=1 --branch="${WC_VERSION}" https://github.com/woocommerce/woocommerce.git "${WC_TMPDIR}" - mv "${WC_TMPDIR}"/plugins/woocommerce/* "$WC_DIR" + ln -s "${WC_TMPDIR}"/plugins/woocommerce "$WC_DIR" touch "$WC_VERSION_FILE" # Install composer for WooCommerce