2018-09-21 13:06:16 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# usage: travis.sh before|after
|
|
|
|
|
2020-01-16 14:03:44 +00:00
|
|
|
if [ "$1" == 'before' ]; then
|
2019-07-30 20:05:25 +00:00
|
|
|
cd "$WP_CORE_DIR/wp-content/plugins/woocommerce-admin/"
|
2019-09-25 18:20:15 +00:00
|
|
|
npm run build:feature-config
|
2020-11-18 19:36:45 +00:00
|
|
|
|
|
|
|
# This is a temporary solution for a breaking change in composer 2.0.7
|
|
|
|
# to the Jetpack autoloader. This can be removed when
|
|
|
|
# https://github.com/Automattic/jetpack/pull/17813 is merged.
|
2020-11-16 04:33:06 +00:00
|
|
|
composer self-update 2.0.6
|
2020-01-22 19:20:27 +00:00
|
|
|
if [[ "$COMPOSER_DEV" == "1" ]]; then
|
2018-11-02 14:06:29 +00:00
|
|
|
composer install
|
2019-07-30 20:05:25 +00:00
|
|
|
else
|
|
|
|
composer install --no-dev
|
2018-11-02 14:06:29 +00:00
|
|
|
fi
|
2021-01-14 13:43:14 +00:00
|
|
|
# phpunit ^7 is not supported in php 7.0
|
|
|
|
if [[ "$PHPUNIT" == "6" ]]; then
|
|
|
|
curl -fsSL -o vendor/bin/phpunit https://phar.phpunit.de/phpunit-6.5.9.phar --create-dirs && chmod +x vendor/bin/phpunit
|
|
|
|
fi
|
2018-09-21 13:06:16 +00:00
|
|
|
fi
|