-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 816 Bytes
/
Makefile
File metadata and controls
30 lines (24 loc) · 816 Bytes
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
SHELL := /usr/bin/env bash
.PHONY: test
test: phpunit phpmd phpcs
.PHONY: phpcs
phpcs:
./vendor/bin/php-cs-fixer fix --dry-run
.PHONY: phpmd
phpmd:
./vendor/bin/phpmd $$((\
find * -maxdepth 0 -not -name 'vendor' -not -name 'Tests' -type d && \
find Tests/ -mindepth 1 -maxdepth 1 -not -name 'Fixtures' && \
find Tests/Fixtures/ -mindepth 2 -maxdepth 2 -not -name 'var' \
) | paste --delimiter , --serial) text phpmd.xml
.PHONY: phpunit
phpunit:
./vendor/bin/phpunit
.PHONY: update-test
update-test: | composer
rm -rf Tests/Fixtures/TestProject/cache/test/
./composer install
composer:
$(if $(shell which composer 2> /dev/null),\
ln --symbolic $$(which composer) composer,\
curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=$$(pwd) --filename=composer)