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