-
Notifications
You must be signed in to change notification settings - Fork 77
/
Makefile
41 lines (33 loc) · 814 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
BEHAT:=$(shell command -v behat 2> /dev/null)
PHPCS:=$(shell command -v phpcs 2> /dev/null)
COMPOSER_CMD:=$(shell command -v composer 2> /dev/null)
.DEFAULT_GOAL=all
.PHONY: all
all: test phpcs
.PHONY: clean
clean:
rm -rf vendor
rm -f composer.lock
.PHONY: test
test: phpunit behat
.PHONY: phpunit
phpunit: composer.lock
vendor/bin/phpunit
.PHONY: behat
behat: composer.lock
ifndef BEHAT
$(error "behat is not available, please install to continue")
endif
behat --stop-on-failure
.PHONY: phpcs
phpcs: composer.lock
ifndef PHPCS
$(error "phpcs is not available, please install to continue")
endif
phpcs src --standard=PSR2
phpcs tests --standard=PSR2
composer.lock: composer.json
ifndef COMPOSER_CMD
$(error "composer is not available, please install to continue")
endif
composer install