-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
52 lines (42 loc) · 901 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
44
45
46
47
48
49
50
51
52
.PHONY: help
.DEFAULT_GOAL := help
## Show help
help:
@echo "Usage:"
@echo " make <target>"
@echo ""
@echo "Targets:"
@awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf " %-20s %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
@echo ""
@echo ""
## initialize project
install:
composer install
## fix php code style
ecs:
vendor/bin/ecs --fix
## check code with phpstan
phpstan:
vendor/bin/phpstan --memory-limit=2G
## check code with all tools
styles:
make ecs
make phpstan
## PHP Unit
phpunit:
cd tests/App && yarn install && yarn dev
vendor/bin/phpunit
## server start
server:
symfony server:start --dir=tests/App
## docsify server start
docsify:
docsify serve docs