-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (35 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
# Variables
target_container ?= php
php_sources ?= .
js_sources ?= Resources/public/js/editor
css_sources ?= Resources/public/css/editor-*.css
# Bash Commands
.PHONY: command
command:
docker-compose run --rm $(target_container) $(cmd)
# PHP commands
.PHONY: composer-update
composer-update:
docker-compose run --rm php composer update
.PHONY: composer-install
composer-install:
docker-compose run --rm php composer install
.PHONY: phploc
phploc:
docker run -i -v `pwd`:/project jolicode/phaudit bash -c "phploc $(php_sources); exit $$?"
.PHONY: phpcs
phpcs:
docker run -i -v `pwd`:/project jolicode/phaudit bash -c "phpcs $(php_sources) --extensions=php --ignore=vendor,app/cache,Tests/cache --standard=PSR2; exit $$?"
.PHONY: phpcpd
phpcpd:
docker run -i -v `pwd`:/project jolicode/phaudit bash -c "phpcpd $(php_sources); exit $$?"
.PHONY: phpdcd
phpdcd:
docker run -i -v `pwd`:/project jolicode/phaudit bash -c "phpdcd $(php_sources); exit $$?"
.PHONY: phpcs-fix
phpcs-fix:
docker run --rm -i -v `pwd`:`pwd` -w `pwd` grachev/php-cs-fixer --rules=@Symfony --verbose fix $(php_sources)
# Symfony bundle commands
.PHONY: phpunit
phpunit: ./vendor/bin/phpunit
docker-compose run --rm php ./vendor/bin/phpunit --coverage-text