forked from otis22/reverso
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (34 loc) · 1008 Bytes
/
Copy pathMakefile
File metadata and controls
49 lines (34 loc) · 1008 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
38
39
40
41
42
43
44
45
46
47
48
49
default_php_version:=7.4
default_server_port:=8080
php_version:=$(PHP_VERSION)
server_port:=$(PORT)
ifndef PHP_VERSION
php_version:=$(default_php_version)
endif
ifndef PORT
server_port:=$(default_server_port)
endif
base_dir:=$(shell basename $(CURDIR))
docker:=docker run --rm -u=$(shell id -u):$(shell id -g) -v $(CURDIR):/app -w /app $(base_dir):$(php_version)
build:
docker build --build-arg VERSION=$(php_version) --tag $(base_dir):$(php_version) ./docker/
exec:
docker run --rm -ti -v $(CURDIR):/app:rw -w /app $(base_dir):$(php_version) sh
security:
$(docker) composer security
install:
$(docker) composer install
install-no-dev:
$(docker) composer install --no-dev
style:
$(docker) composer style
style-fix:
$(docker) composer style
static-analyze:
$(docker) composer static-analyze
unit:
$(docker) -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit
coverage:
$(docker) composer coverage
all: build install style static-analyze unit coverage
.PHONY: build