-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (23 loc) · 806 Bytes
/
Makefile
File metadata and controls
29 lines (23 loc) · 806 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
.PHONY: build up test lint
NAME := efes
build:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o $(NAME)
MAIN_COMPOSE := docker compose -f ./Docker/docker-compose.yml
build-docker:
$(MAIN_COMPOSE) build efes-base
mkdir -p ./bin
docker create --name efes-builder efes/base
docker cp efes-builder:/usr/local/bin/efes - > ./bin/efes
docker rm -v efes-builder
MAIN_COMPOSE := docker compose -f ./Docker/docker-compose.yml
up:
$(MAIN_COMPOSE) build efes-base
$(MAIN_COMPOSE) rm -fsv
$(MAIN_COMPOSE) up efes-tracker efes-server --build --abort-on-container-exit
TEST_COMPOSE := docker compose -f ./Docker/docker-compose-test.yml
test:
$(TEST_COMPOSE) rm -fsv
mkdir -p ./coverage
$(TEST_COMPOSE) up efes-test --build --exit-code-from efes-test --abort-on-container-exit
lint:
golangci-lint run