-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
54 lines (40 loc) · 1.18 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
53
54
DOCKER = $(shell which docker)
ifeq ($(DOCKER),)
$(error "Docker not available on this system")
endif
DOCKER_COMPOSE = UID=`id -u` GID=`id -g` $(shell which docker-compose)
ifeq ($(DOCKER_COMPOSE),)
$(error "DockerCompose not available on this system")
endif
# use to override vars for your platform
ifeq (env.mk,$(wildcard env.mk))
include env.mk
endif
.PHONY: deps doc test
all: build_imgs up tests rel
build_imgs:
@echo "Update docker images..."
@${DOCKER_COMPOSE} build
up:
@${DOCKER_COMPOSE} up -d
down:
@${DOCKER_COMPOSE} down
tests:
@echo "Testing..."
@${DOCKER_COMPOSE} exec test bash -c "cd /project && make -f docker.mk tests"
test: tests
rel:
@echo "Build release..."
@${DOCKER_COMPOSE} exec test bash -c "cd /project && make -f docker.mk prod"
doc:
@echo "Generate docs..."
@${DOCKER_COMPOSE} exec test bash -c "cd /project && make -f docker.mk doc"
lint:
@echo "Lint..."
@${DOCKER_COMPOSE} exec test bash -c "cd /project && make -f docker.mk lint"
xref:
@echo "Xref analysis..."
@${DOCKER_COMPOSE} exec test bash -c "cd /project && make -f docker.mk xref"
dialyzer:
@echo "Dialyzer..."
@${DOCKER_COMPOSE} exec test bash -c "cd /project && make -f docker.mk dialyzer"