forked from phpecc/phpecc
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
43 lines (33 loc) · 903 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
34
35
36
37
38
39
40
41
42
43
test: phpunit phpcs
.PHONY: test phpunit phpcs
pretest:
composer install --dev
phpunit: pretest
mkdir -p tests/output
vendor/bin/phpunit --coverage-text --coverage-clover=tests/output/coverage.clover --coverage-html=tests/output/Results
ifndef STRICT
STRICT = 0
endif
ifeq "$(STRICT)" "1"
phpcs: pretest
vendor/bin/phpcs --standard=PSR2 src
else
phpcs: pretest
vendor/bin/phpcs --standard=PSR2 -n src
endif
phpcbf: pretest
vendor/bin/phpcbf --standard=PSR2 -n src
ifdef OCULAR_TOKEN
scrutinizer: ocular
@php ocular.phar code-coverage:upload --format=php-clover tests/output/coverage.clover --access-token=$(OCULAR_TOKEN);
else
scrutinizer: ocular
php ocular.phar code-coverage:upload --format=php-clover tests/output/coverage.clover;
endif
clean: clean-env clean-deps
clean-env:
rm -rf coverage.clover
rm -rf ocular.phar
rm -rf tests/output/
clean-deps:
rm -rf vendor/