-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (37 loc) · 1.62 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
#!/usr/bin/make
SCRIPT_VERSION=v1.0
SCRIPT_AUTHOR=Antonio Miguel Morillo Chica
HELP_FUN = \
%help; while(<>){ \
push@{$$help{$$2//'options'}},[$$1,$$3] \
if/^([\w-_]+)\s*:.*\#\#(?:@(\w+))?\s(.*)$$/ \
}; \
print"$$_:\n", map" $$_->[0]".(" "x(20-length($$_->[0])))."$$_->[1]\n",\
@{$$help{$$_}},"\n" for keys %help; \
help: ##@Miscellaneous Show this help
@echo "Usage: make [target] ...\n"
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
@echo "Written by $(SCRIPT_AUTHOR), version $(SCRIPT_VERSION)"
@echo "Please report any bug or error to the author."
run: ##@Container Build and run php container
docker compose -f docker-compose.yml up -d --build
build: ##@Container Build php container
docker compose -f docker-compose.yml build
stop: ##@Container Stop php container
docker compose -f docker-compose.yml down
destroy: ##@Container Remove all data related with php container
docker compose -f docker-compose.yml down --rmi all
shell: ##@Container SSH in container
docker compose -f docker-compose.yml exec php /bin/bash
logs: ##@Container SSH logs in container
docker compose -f docker-compose.yml logs
lint: ##@Style Show style errors
docker compose -f docker-compose.yml exec php composer lint
lint-fix: ##@Style Fix style errors
docker compose -f docker-compose.yml exec php composer lint:fix
test: ##@Tests Execute tests
docker compose -f docker-compose.yml exec php composer test
test-coverage: ##@Tests Execute tests with coverage
docker compose -f docker-compose.yml exec php composer test:coverage
exec: ##@Code Execute composer commands
docker compose -f docker-compose.yml exec php composer exec