2022-11-17 13:53:25 +01:00
|
|
|
PHP ?=
|
2022-04-19 10:28:56 +02:00
|
|
|
TEST ?=
|
2017-12-06 13:46:33 +01:00
|
|
|
|
2015-02-16 21:06:04 +01:00
|
|
|
docs:
|
2022-11-16 13:05:34 +01:00
|
|
|
docker run --rm -v $$(pwd)/src:/data/src -v $$(pwd)/docs:/data/docs -w /data php:cli bash -c "\
|
|
|
|
curl -s -L -O https://phpdoc.org/phpDocumentor.phar;\
|
|
|
|
php phpDocumentor.phar --directory=src --target=docs --visibility=public --defaultpackagename=Minify --title=Minify;"
|
2017-09-21 19:12:16 +02:00
|
|
|
|
|
|
|
test:
|
2022-11-17 13:53:25 +01:00
|
|
|
VERSION=$$(echo "$(PHP)-cli" | sed "s/^-//");\
|
|
|
|
test $$(docker images -q matthiasmullie/minify:$$VERSION) || docker build -t matthiasmullie/minify:$$VERSION . --build-arg VERSION=$$VERSION;\
|
|
|
|
docker run -v $$(pwd)/src:/var/www/src -v $$(pwd)/tests:/var/www/tests -v $$(pwd)/build:/var/www/build matthiasmullie/minify:$$VERSION env XDEBUG_MODE=coverage vendor/bin/phpunit $(TEST) --coverage-clover build/coverage-$(PHP)-$(TEST).clover
|
|
|
|
|
2022-11-18 16:43:18 +01:00
|
|
|
format:
|
2022-11-17 13:53:25 +01:00
|
|
|
test $$(docker images -q matthiasmullie/minify:cli) || docker build -t matthiasmullie/minify:cli .
|
2022-11-18 16:43:18 +01:00
|
|
|
docker run -v $$(pwd)/src:/var/www/src -v $$(pwd)/tests:/var/www/tests matthiasmullie/minify:cli sh -c "vendor/bin/php-cs-fixer fix && vendor/bin/phpcbf --standard=ruleset.xml"
|
2022-11-16 13:05:34 +01:00
|
|
|
|
|
|
|
.PHONY: docs
|