-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 865 Bytes
/
Makefile
File metadata and controls
44 lines (34 loc) · 865 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
42
43
44
.PHONY: setup fmt lint test check all dev dev-api dev-worker
# Set up git hooks
setup:
git config core.hooksPath .githooks
@echo "Git hooks configured!"
# Format code
fmt:
cargo fmt --all
# Run clippy
lint:
cargo clippy --workspace --all-targets -- -D warnings
# Run tests
test:
cargo test --workspace
# Run all checks (same as CI)
check: fmt lint test
# Build release
build:
cargo build --workspace --release
# Run all checks before commit
all: check build
# Start local development (databases + API + worker)
dev:
docker-compose up -d db redis
@echo "Starting API and worker..."
@trap 'kill 0' INT; cargo run --bin brin-api & cargo run --bin brin-worker & wait
# Start only the API
dev-api:
docker-compose up -d db redis
cargo run --bin brin-api
# Start only the worker
dev-worker:
docker-compose up -d db redis
cargo run --bin brin-worker