31 строка
765 B
Makefile
Executable File
31 строка
765 B
Makefile
Executable File
.PHONY: reinstall test
|
|
|
|
WP_CLI = tools/wp-cli.phar
|
|
PHPUNIT = tools/phpunit.phar
|
|
|
|
reinstall: $(WP_CLI)
|
|
$(WP_CLI) plugin uninstall --deactivate wp-sw-cache --path=$(WORDPRESS_PATH)
|
|
rm -f wp-sw-cache.zip
|
|
zip wp-sw-cache.zip -r wp-sw-cache/
|
|
$(WP_CLI) plugin install --activate wp-sw-cache.zip --path=$(WORDPRESS_PATH)
|
|
|
|
test: $(PHPUNIT)
|
|
$(PHPUNIT)
|
|
|
|
test-sw: node_modules
|
|
$(NODE) node_modules/karma/bin/karma start karma.conf
|
|
|
|
node_modules:
|
|
npm install
|
|
|
|
tools/wp-cli.phar:
|
|
mkdir -p tools
|
|
wget -P tools -N https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
|
chmod +x $(WP_CLI)
|
|
|
|
tools/phpunit.phar:
|
|
mkdir -p tools
|
|
wget -P tools -N https://phar.phpunit.de/phpunit-old.phar
|
|
mv tools/phpunit-old.phar tools/phpunit.phar
|
|
chmod +x $(PHPUNIT)
|