-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
47 lines (35 loc) · 1.31 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
COMPONENT := featurebalancer
CONTAINER := phpcli
IMAGES ?= false
PHP_VERSION ?: false
APP_ROOT := /app/feature-balancer
CODE_COVERAGE_FORMAT ?= clover
all: dev logs
dev:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml up -d --build
enter:
@docker exec -ti ${COMPONENT}_${CONTAINER}_1 /bin/sh
kill:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml kill
nodev:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml kill
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml rm -f
ifeq ($(IMAGES),true)
@docker rmi ${COMPONENT}_${CONTAINER}
endif
deps:
@docker exec -t ${COMPONENT}_${CONTAINER}_1 php-5.5 /usr/bin/composer install
test: unit
unit:
@docker exec -t ${COMPONENT}_${CONTAINER}_1 ${APP_ROOT}/ops/scripts/unit.sh ${PHP_VERSION}
code-coverage:
# Wrapped because docker compose generate weird error codes. see https://github.com/docker/compose/issues/3379#issuecomment-214715606
@docker exec -t ${COMPONENT}_${CONTAINER}_1 sh -c 'php-7.0 ${APP_ROOT}/bin/app code-coverage:run ${CODE_COVERAGE_FORMAT}'
ps: status
status:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml ps
logs:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml logs
tag: # List last tag for this repo
@git tag -l | sort -r |head -1
restart: nodev dev logs