-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (30 loc) · 779 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (30 loc) · 779 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
40
41
BIN_DIR := bin
GO_PACKAGES := ./...
COMPOSE_FILE := deploy/compose.yaml
COMPOSE := docker compose -f $(COMPOSE_FILE)
.PHONY: fmt test build compose-config compose-up compose-down smoke e2e validate clean
fmt:
gofmt -w cmd internal
test:
go test $(GO_PACKAGES)
build:
mkdir -p $(BIN_DIR)
go build -o $(BIN_DIR)/airpc ./cmd/airpc
go build -o $(BIN_DIR)/airpc-e2e ./cmd/airpc-e2e
compose-config:
$(COMPOSE) config >/dev/null
compose-up:
$(COMPOSE) up -d --build
compose-down:
$(COMPOSE) down --remove-orphans
smoke:
./deploy/scripts/smoke.sh
e2e: compose-config
set -e; \
trap '$(COMPOSE) down --remove-orphans' EXIT; \
$(COMPOSE) up -d --build; \
./deploy/scripts/smoke.sh
validate: fmt test build compose-config
git diff --check
clean:
rm -rf $(BIN_DIR)