forked from TBoileau/cupidon-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (43 loc) · 1.22 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
.PHONY: install build analyse phpstan phpinsights phpcpd phpmd tests
profile:
make prepare env=$(env)
blackfire-player run .blackfire.yaml --endpoint=$(endpoint) --blackfire-env=cupidon
install:
cp .env.dist .env.$(env).local
sed -i -e 's/DATABASE_USER/$(db_user)/' .env.$(env).local
sed -i -e 's/DATABASE_PASSWORD/$(db_password)/' .env.$(env).local
composer install
make prepare env=$(env)
php bin/console lexik:jwt:generate-keypair --overwrite --quiet --env $(env)
composer:
composer valid
phpstan:
php vendor/bin/phpstan analyse -c phpstan.neon src --no-progress
phpinsights:
vendor/bin/phpinsights --no-interaction
phpcpd:
vendor/bin/phpcpd src/
phpmd:
vendor/bin/phpmd src/ text .phpmd.xml
database:
php bin/console doctrine:database:drop --if-exists --force --env=$(env)
php bin/console doctrine:database:create --env=$(env)
php bin/console doctrine:schema:update --force --env=$(env)
fixtures:
php bin/console doctrine:fixtures:load -n --env=$(env)
prepare:
make database env=$(env)
make fixtures env=$(env)
analyse:
make composer
make phpcpd
make phpmd
make phpinsights
make phpstan
tests:
php bin/phpunit --testdox
fix:
vendor/bin/php-cs-fixer fix
deploy:
composer install
make prepare env=$(env)