-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (41 loc) · 1.35 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
DOCKER = @docker
DOCKER_COMPOSE = @docker-compose
PHP = $(DOCKER_COMPOSE) run --rm php
.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
##
## Project
##---------------------------------------------------------------------------
.PHONY: boot up down vendor
boot: ## Launch the project
boot: up vendor
up: ## Up the containers
up:
$(DOCKER_COMPOSE) up -d --remove-orphans
down: ## Down the containers
down:
$(DOCKER_COMPOSE) down
vendor: ## Install the dependencies
vendor:
$(PHP) composer install
##
## Tools
##---------------------------------------------------------------------------
.PHONY: php-cs-fixer phpstan
php-cs-fixer: ## Run PHP-CS-FIXER against a specific DIRECTORY (or . by default)
php-cs-fixer:
$(PHP) vendor/bin/php-cs-fixer fix $(or $(DIRECTORY), .)
phpstan: ## Run PHPStan against a specific DIRECTORY (a specific LEVEL can be define)
phpstan:
$(PHP) vendor/bin/phpstan analyse -c phpstan.neon --level $(or $(LEVEL), 8)
##
## Tests
##---------------------------------------------------------------------------
.PHONY: tests infection
tests: ## Launch the PHPUnit tests
tests:
$(PHP) vendor/bin/phpunit tests
infection: ## Launch Infection
infection:
$(PHP) vendor/bin/infection