-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 830 Bytes
/
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
current-dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
IMAGE=php-price-engine
.PHONY: build
build: deps
docker build -t $(IMAGE) .
.PHONY: clean
clean:
docker rmi $(IMAGE)
.PHONY: deps
deps: composer-install
.PHONY: composer-install
composer-install: CMD=install
.PHONY: composer-update
composer-update: CMD=update
.PHONY: composer-require
composer-require: CMD=require
composer-require: INTERACTIVE=-ti --interactive
.PHONY: composer
composer composer-install composer-update composer-require composer-require-module:
@docker run --rm $(INTERACTIVE) --volume $(current-dir):/app --user $(id -u):$(id -g) \
composer:2.3.7 $(CMD) \
--ignore-platform-reqs \
--no-ansi
.PHONY: test
test: composer-install
docker run --rm -v $(PWD):/app -w /app $(IMAGE) vendor/bin/phpunit $(FILTER_TEST_OPTIONS) --testdox;