add flag to distinguish between the development repo and npm package

This commit is contained in:
Ron Rennick 2021-11-16 11:35:30 -04:00
parent c91dda177d
commit df582a20d3
1 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,14 @@ SCRIPTPATH=$(dirname "$0")
REALPATH=$(readlink "$0")
cd "$SCRIPTPATH/$(dirname "$REALPATH")/.."
# Set a flag to distinguish between the development repo and npm package
DEV_PATH=$(echo $0 | rev | cut -f4 -d/ | rev)
if [ "$DEV_PATH" != "node_modules" ]; then
export WC_E2E_WOOCOMMERCE_DEV=true
else
export WC_E2E_WOOCOMMERCE_DEV=false
fi
# Run scripts
case $1 in
'docker:up')