-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 948 Bytes
/
Makefile
File metadata and controls
37 lines (26 loc) · 948 Bytes
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
PHP_VERSION ?= php-7.4
CONTAINER_NAME ?= package_generator
COMPOSER ?= /usr/bin/composer
DOCKER_COMPOSE ?= docker compose
DOCKER_EXEC_CONTAINER ?= docker exec -t $(CONTAINER_NAME)
.PHONY: bash build cs-fixer down install phpstan phpunit rector up update
bash:
$(DOCKER_EXEC_CONTAINER) bash
build:
$(DOCKER_COMPOSE) build
cs-fixer:
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/php-cs-fixer fix --ansi --diff --verbose
down:
$(DOCKER_COMPOSE) down
install:
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) $(COMPOSER) install
phpstan:
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/phpstan analyze src --level=2
phpunit:
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/phpunit --stop-on-failure --stop-on-error $(ARGS)
rector:
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) vendor/bin/rector process
up:
$(DOCKER_COMPOSE) up -d
update:
$(DOCKER_EXEC_CONTAINER) $(PHP_VERSION) $(COMPOSER) update