-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (45 loc) · 1.69 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
SHELL := /bin/sh
CURRDIR := $(shell basename $(shell pwd) | sed 's/-/_/g')
.PHONY: help
help:
@echo "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' | column -c2 -t -s :)"
docker-config: ## output config with variable subtitution
docker-config:
@CURRDIR=$(CURRDIR) docker-compose config
docker-start: ## start containers
docker-start:
@CURRDIR=$(CURRDIR) docker-compose up --remove-orphans -d
docker-stop: ## stop containers
docker-stop:
@CURRDIR=$(CURRDIR) docker-compose stop
docker-remove: ## remove containers
docker-remove:
@CURRDIR=$(CURRDIR) docker-compose down
docker-restart: ## stop, remove and start containers
docker-restart: docker-remove docker-start
docker-rebuild: ## rebuild containers without cache
docker-rebuild:
@CURRDIR=$(CURRDIR) docker-compose build --no-cache
docker-clean: ## Remove all containers, rebuild them, and start them.
docker-clean: docker-remove docker-rebuild docker-start
docker-shell: ## Open a shell session on the PHP container
docker-shell:
@docker exec -it $(CURRDIR)_php /bin/sh
docker-logs: ## follow all containers' logs
docker-logs:
@CURRDIR=$(CURRDIR) docker-compose logs --tail="10" -f
codecheck: ## Check that all the codeses are nice.
codecheck: ecsfix phpstan
ecs: ## Invoke EasyCodingStandard on the src/ directory
ecs:
@vendor/bin/ecs check --no-progress-bar -- src/ tests/
ecsfix: ## Invoke EasyCodingStandard on the src/ directory
ecsfix:
@vendor/bin/ecs check --no-progress-bar --fix -- src/ tests/
phpstan: ## Invoke PHP static analysis on the src/ directory
phpstan:
@vendor/bin/phpstan analyse -l max --no-interaction --no-progress -- src/ tests/
test: ## Run tests
test:
@vendor/bin/phpunit
@php code-coverage.php clover.xml 80