This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
89 lines (63 loc) · 2.13 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
ENV = "dev"
usage:
@echo "make install - to install on dev";
@echo "make sync - to synchronize developpers current code";
@echo "make deploy-configure - to configure app before deployment";
@echo "make deploy-install - to install on production";
@echo "make deploy-update - to update on production";
@echo "make test-all - install test env & launch phpunit and behat validations";
configure:
@if test ! -f app/config/parameters.yml; then echo "app/config/parameters.yml is missing"; exit 1; fi
curl -s http://getcomposer.org/installer | php
php composer.phar install --prefer-dist
app/console assets:install web
app/console assetic:dump --env=$(ENV)
drop-db:
app/console doctrine:database:drop --env=$(ENV) --force
install:
app/console doctrine:database:create --env=$(ENV)
app/console doctrine:schema:create --env=$(ENV)
app/console doctrine:phpcr:repository:init --env=$(ENV)
app/console doctrine:phpcr:fixtures:load --no-interaction --env=$(ENV)
app/console doctrine:fixture:load --no-interaction --env=$(ENV)
update-dev:
app/console cache:clear --env=$(ENV)
make drop-db
make install
update-prod:
app/console cache:clear --env=$(ENV)
app/console doctrine:migrations:migrate
## Production
deploy-configure: ENV = "prod"
deploy-configure: configure
deploy-install: ENV = "prod"
deploy-install: install
deploy-update: ENV = "prod"
deploy-update: update-dev
## Test
test-install: ENV = "test"
test-install: install
test-all: test-install test-phpunit test-behat test-clean
test-clean:
app/console doctrine:database:drop --env=test --force
test-behat:
bin/behat
test-phpunit:
bin/phpunit -c app/
## Development task
ai:
app/console assets:install web
cs:
phpcs --extensions=php -n --standard=PSR2 --report=full src
cs-fixer:
php-cs-fixer fix src
cc:
rm -rf app/cache/*
refresh:
app/console doctrine:phpcr:fixtures:load --no-interaction --env=$(ENV)
app/console doctrine:fixture:load --no-interaction --env=$(ENV)
app/console cache:clear --env=$(ENV)
refresh-content:
app/console doctrine:phpcr:fixtures:load --no-interaction --env=$(ENV)
refresh-orm:
app/console doctrine:fixtures:load --no-interaction --env=$(ENV)