forked from salsify/jsonstreamingparser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (25 loc) · 1014 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PHPSTAN_LEVEL=5
PHPSTAN_VERSION="0.10.5"
tools/php-cs-fixer:
wget --directory-prefix=tools --quiet https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar
mv tools/php-cs-fixer-v2.phar tools/php-cs-fixer
chmod +x tools/php-cs-fixer
tools/phpstan:
wget --directory-prefix=tools --quiet https://github.com/phpstan/phpstan-shim/raw/$(PHPSTAN_VERSION)/phpstan
chmod +x tools/phpstan
tools/phpunit.phar:
wget --directory-prefix=tools --quiet https://phar.phpunit.de/phpunit-7.phar
mv tools/phpunit-7.phar tools/phpunit.phar
chmod +x tools/phpunit.phar
phpcs: tools/php-cs-fixer tools/phpstan
composer install --optimize-autoloader --no-dev --no-suggest --quiet
tools/php-cs-fixer fix --dry-run --stop-on-violation -v
tools/phpstan analyze --level=$(PHPSTAN_LEVEL) --no-progress src/
test: tools/phpunit.phar
composer install --optimize-autoloader --no-suggest --quiet
tools/phpunit.phar
fix-cs: tools/php-cs-fixer
tools/php-cs-fixer fix -v
clean:
rm tools/ vendor/ -fr
.PHONY: clean phpcs fix-cs