-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (50 loc) · 2.25 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.DEFAULT_GOAL=help
project-name := Example
.PHONY: help
## —— Symfony 🎶 ———————————————————————————————————————————————————————————————
install: composer.lock.installed ## Install project
up:
@docker-compose up -d
down:
@docker-compose down --remove-orphans --volumes
build:
@docker-compose build --pull --no-cache
composer.lock.installed:
@./php composer install
@./php yarn install
@./php yarn build
composer-validate:
@./php composer validate
php-cs-fixer:
@./php ./vendor/bin/php-cs-fixer fix --diff --config=.php-cs-fixer.dist.php -v --dry-run --using-cache no --ansi
phpstan:
@./php ./vendor/bin/phpstan analyze --memory-limit=-1 -l max --no-progress ./src --ansi
security-checker:
@./vendor/bin/security-checker --path=$$PWD
lint: composer-validate php-cs-fixer phpstan security-checker
cc: ## Clear the cache
@./php bin/console c:c
cc-test: ## Clear the cache for test env
@./php bin/console c:c --env=test
validate-schema:
@./php php bin/console d:s:v --env=test
test: composer-validate## Run test suite
@./php mkdir -p ./coverage
@./php php -d xdebug.mode=coverage ./vendor/bin/paratest --coverage-html=./coverage --coverage-clover=./coverage/clover.xml
@./php php -d xdebug.mode=coverage ./vendor/bin/coverage-check ./coverage/clover.xml 93
@echo ---------------
@echo file://$(shell pwd)/coverage/index.html
@echo ---------------
clean: ## Reset project to initial state
@./php rm -rf vendor build composer.lock node_modules var public/assets
## —— Others 🛠️️ ———————————————————————————————————————————————————————————————
help: ## Liste des commandes
@echo -e '\033[0;33m=================================\033[0m'
@echo -e '\033[0;33m$(project-name)\033[0m'
@echo -e '\033[0;33m=================================\033[0m'
@echo
@echo -e '\033[0;33mUsage: \033[0m'
@echo ' make [target]'
@echo
@echo -e '\033[0;33mTargets: \033[0m'
@grep -hE '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-10s\033[0m %s\n", $$1, $$2}'