-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
79 lines (59 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
COMPOSE_FILE = ./config/docker/docker-compose.yml
ENV_FILE = ./config/docker/.env
DC = docker compose -f ${COMPOSE_FILE} --env-file ${ENV_FILE}
DC_EXEC = ${DC} exec supervisord-monitor-app
build:
${DC} build
up:
${DC} up -d --remove-orphans
${DC_EXEC} bin/console assets:install
down:
${DC} down
down_force:
${DC} down -v --rmi=all --remove-orphans
console:
if ! ${DC} ps | grep -q supervisord-monitor; then make up; fi
${DC_EXEC} sh
include ./config/docker/.env
create_network:
docker network create --subnet 172.18.3.0/24 ${EXTERNAL_NETWORK_NAME} >/dev/null 2>&1 || true
app_test_fixtures:
${DC_EXEC} php bin/console --env=test doctrine:fixtures:load -n
app_gen_jwt_keypair:
${DC_EXEC} php bin/console lexik:jwt:generate-keypair
app_phpunit:
${DC_EXEC} composer run phpunit
db_migrate:
${DC_EXEC} bin/console doctrine:migrations:migrate --no-interaction
db_diff:
${DC_EXEC} bin/console doctrine:migrations:diff --no-interaction
code_phpstan:
${DC_EXEC} composer run phpstan
code_deptrac:
${DC_EXEC} composer run deptrac
code_cs_fix:
${DC_EXEC} composer run cs-fixer
code_rector:
${DC_EXEC} composer run rector
code_cs_fix_diff:
${DC_EXEC} composer run cs-fixer-diff
code_cs_fix_diff_status:
if make code_cs_fix_diff; then \
printf '\n\n\n [OK] \n\n\n'; \
exit 0; \
else \
printf '\n\n\n [FAIL] \n\n\n'; \
exit 1; \
fi
code_cs_fix_diff_status_no_docker:
if make code_cs_fix_diff_no_docker; then \
printf '\n\n\n [OK] \n\n\n'; \
exit 0; \
else \
printf '\n\n\n [FAIL] \n\n\n'; \
exit 1; \
fi
gen_ts:
${DC_EXEC} composer run gen-ts
front_format_fix: ## Format frontend
docker exec supervisord-monitor-app /bin/sh -c 'cd assets && npm run format:fix'