-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
91 lines (71 loc) · 1.7 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
80
81
82
83
84
85
86
87
88
89
90
91
SHELL=/bin/bash
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
# -- Start Docker
start:
@docker compose up -d
stop:
@docker compose down
restart: stop start
# -- End Docker
# -- Start Environment
build: stop
@docker compose build --pull
build\:no-cache: stop
@docker compose build --pull --no-cache
clear-cache:
@echo "clear-cache start"
@bin/artisan cache:clear
@bin/artisan config:clear
@bin/artisan route:clear
@bin/artisan view:clear
@bin/artisan event:clear
@echo "✅ clear-cache terminée"
optimize-project:
@echo "start"
@bin/artisan config:cache
@bin/artisan route:cache
@bin/artisan view:cache
@bin/artisan event:cache
@bin/artisan optimize
@bin/artisan queue:restart
@echo "✅ terminée !"
restart-and-clear:
@make clear-cache
@make optimize-project
db: start
@sleep 1s
@bin/artisan db:wipe
@bin/artisan migrate
db\:test: start
@sleep 1s
@bin/artisan db:wipe --env=test
@bin/artisan migrate --env=test
install: start db rights
@sleep 1s
@bin/composer install
@npm i
fixture: db
@bin/artisan db:seed
rights: start
@sudo chmod -R 777 storage
@sudo chmod -R 777 bootstrap/cache
@sudo chown -R ${CURRENT_UID}:${CURRENT_GID} ./
# -- End Environment
# -- Start Code linter & test (CI)
test: db\:test test\:unit test\:feature
test\:unit:
@bin/php vendor/bin/phpunit tests/Unit
test\:feature:
@bin/php vendor/bin/phpunit tests/Feature
lint:
@bin/php vendor/bin/pint -v
@bin/php vendor/bin/phpstan analyse
@bin/php vendor/bin/rector process --xdebug
# @bin/php ./vendor/bin/psalm
# @bin/php vendor/bin/phpcpd src
# @npm run lint
@make rights
ci: lint test
@make rights
# -- End Code linter & test (CI)