forked from bobdenotter/bolt-api-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (43 loc) · 1.75 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
.PHONY: help install server server-stop cache csclear cscheck csfix stancheck db-create db-update db-reset
.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/'
install: ## to install all project
composer install
make db-create
server: ## to start server
bin/console server:start 127.0.0.1:8088 || true
server-stop: ## to stop server
bin/console server:stop
cache: ## to clean cache
bin/console cache:clear
csclear: ## to clean cache and check coding style
mkdir -p var/cache/ecs
chmod -R a+rw var/cache/ecs
rm -rf var/cache/ecs/*
cscheck: ## to check coding style
make csclear
composer lint
make stancheck
csfix: ## to fix coding style
make csclear
composer lint:fix
make stancheck
stancheck: ## to run phpstan
composer phpstan
db-create: ## to create database and load fixtures
bin/console doctrine:database:create
bin/console doctrine:schema:create -q
bin/console doctrine:migrations:sync-metadata-storage -q
bin/console doctrine:migrations:version --add --all --no-interaction -q
bin/console doctrine:fixtures:load --no-interaction -q
db-update: ## to update schema database
bin/console doctrine:schema:update --complete --dump-sql --force --version
bin/console doctrine:migrations:sync-metadata-storage -q
bin/console doctrine:migrations:version --add --all --no-interaction -q
db-reset: ## to delete database and load fixtures
bin/console doctrine:schema:drop --force --full-database
bin/console doctrine:schema:create -q
bin/console doctrine:migrations:sync-metadata-storage -q
bin/console doctrine:migrations:version --add --all --no-interaction -q
bin/console doctrine:fixtures:load --no-interaction