-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (33 loc) · 1.05 KB
/
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
44
45
46
47
48
49
50
.PHONY: php
SUPPORTED_COMMANDS := php composer cube43 test test-and-bdd coverage cs static cbf infection psalm
SUPPORTS_MAKE_ARGS := $(findstring $(firstword $(MAKECMDGOALS)), $(SUPPORTED_COMMANDS))
ifneq "$(SUPPORTS_MAKE_ARGS)" ""
COMMAND_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
COMMAND_ARGS := $(subst :,\:,$(COMMAND_ARGS))
$(eval $(COMMAND_ARGS):;@:)
endif
is-valid: test cs psalm
dup:
docker compose up -d
kill:
docker compose rm -f -s
test:
docker compose exec php php -dpcov.enabled=0 vendor/bin/phpunit $(COMMAND_ARGS)
cs:
docker compose exec php ./vendor/bin/phpcs
cbf:
docker compose exec php ./vendor/bin/phpcbf
psalm:
docker compose exec php ./vendor/bin/psalm
infections:
docker compose exec php ./vendor/bin/infection -s
coverage: dup
docker compose exec php ./vendor/bin/phpunit --coverage-html coverage
update: dup
docker compose exec php composer update
install: dup
docker compose exec php composer install
composer-valid: dup
docker compose exec php composer validate
login:
docker compose exec php sh