forked from bomfather/minefield
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 775 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 775 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
# Default target
.DEFAULT_GOAL := all
# Build target
build:
go build -o bin/minefield main.go
# Test target
test:
go test -v -coverprofile=coverage.out ./...
test-e2e: docker-up
e2e=true go test -v -coverprofile=coverage.out ./...
# Clean target
clean:
rm -rf bin
# Clean Redis data
clean-redis:
docker compose exec -T redis redis-cli ping || docker compose up -d redis
docker compose exec -T redis redis-cli FLUSHALL
# Docker targets
docker-up: docker-down
docker compose up -d
docker-down: clean-redis
docker compose down
docker-logs:
docker compose logs -f
docker-build:
docker build -t ghcr.io/bitbomdev/minefield:latest .
all: build test docker-build
.PHONY: test test-e2e build clean clean-redis docker-up docker-down docker-logs docker-build all