-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·75 lines (52 loc) · 1.65 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
# Variables
php_sources ?= .
phpcs_ignored_files ?= vendor/*,app/cache/*
# Bash Commands
.PHONY: command
command:
docker-compose run --rm php $(cmd)
.PHONY: bash
bash:
docker-compose exec php bash
# Docker commands
.PHONY: build-image
build-image:
docker build -t idci-group-action/php:7.2-fpm -f .docker/php/Dockerfile .
.PHONY: up
up:
docker-compose up -d
.PHONY: down
down:
docker-compose down
# NPM commands
.PHONY: npm-install
npm-install:
docker run --rm -i -v `pwd`:/usr/src/app -w /usr/src/app node:9.5.0 npm install $(options)
.PHONY: webpack-dev
webpack-dev:
docker run --rm -i -v `pwd`:/usr/src/app -w /usr/src/app node:9.5.0 npm run webpack-dev
.PHONY: webpack-prod
webpack-prod:
docker run --rm -i -v `pwd`:/usr/src/app -w /usr/src/app node:9.5.0 npm run webpack-prod
# PHP commands
.PHONY: composer-update
composer-update:
docker-compose run --rm php composer update $(options)
.PHONY: composer-install
composer-install:
docker-compose run --rm php composer install $(options)
.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=$(phpcs_ignored_files) --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)