-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (40 loc) · 1.25 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
DOCKER_DIR := infrastructure
DC := docker-compose -p resource-crawler-bundle
DC_BUILD := $(DC) build
DC_UP := $(DC) up
DC_DOWN := $(DC) down
DC_EXEC := $(DC) exec
PHP_CLI_CONTAINER := php-cli-resource-crawler-bundle
PHP_CLI_CONTAINER_EXEC := $(DC_EXEC) $(PHP_CLI_CONTAINER)
BASH := /bin/bash
COMPOSER := /usr/local/bin/composer
PHPMD := ./vendor/bin/phpmd
PHPCS := ./vendor/bin/phpcs
PHPSTAN := ./vendor/bin/phpstan
PHPUNIT := ./vendor/bin/phpunit
PHPXDEBUG := /usr/local/bin/php-xdebug
build:
cd $(DOCKER_DIR) && $(DC_BUILD)
build-no-cache:
cd $(DOCKER_DIR) && $(DC_BUILD) --no-cache
start:
cd $(DOCKER_DIR) && $(DC_UP) -d
stop:
cd $(DOCKER_DIR) && $(DC_DOWN)
restart:
make stop
make start
ssh:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(BASH)
install:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(COMPOSER) install
phpmd:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(PHPMD) src text cleancode,codesize,controversial,design,naming,unusedcode
phpcs:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(PHPCS)
phpstan:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(PHPSTAN) --xdebug
phpunit:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(PHPUNIT)
xdebug:
cd $(DOCKER_DIR) && $(PHP_CLI_CONTAINER_EXEC) $(PHPXDEBUG) $(PHPUNIT) --filter=$(filter)