Fix woocommerce tests/bin/phpcs.sh

Fix tests/bin/phpcs.sh
This commit is contained in:
Chi-Hsuan Huang 2022-03-30 11:20:16 +08:00
parent c13d126f11
commit d04ace17e8
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
COMMIT_RANGE="${1}...${2}"
CHANGED_FILES=`git diff --name-only --diff-filter=ACMR $COMMIT_RANGE | grep \\\\.php | awk '{print}' ORS=' '`
COMMIT_RANGE="${1} ${2}"
CHANGED_FILES=`git diff --name-only --diff-filter=ACMR $COMMIT_RANGE | grep '\.php' | grep 'plugins/woocommerce/' | sed -e 's/^plugins\/woocommerce\///' | awk '{print}' ORS=' '`
IGNORE="tests/cli/,includes/libraries/,includes/api/legacy/"
if [ "$CHANGED_FILES" != "" ]; then