summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-13 17:35:32 -0800
committerbndw <ben@bdw.to>2026-02-13 17:35:32 -0800
commit6c840f03524187d1f056fdaa70e5f1f9b24cf793 (patch)
tree9b068d5125e79320321ac1a35df30f43482d4aba /Makefile
parent581ceecbf046f99b39885c74e2780a5320e5b15e (diff)
feat: add Protocol Buffer definitions and build tooling
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d01b68b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,39 @@
1.PHONY: proto proto-lint proto-breaking test build clean
2
3# Generate proto files
4proto:
5 buf generate
6
7# Lint proto files
8proto-lint:
9 buf lint
10
11# Check for breaking changes
12proto-breaking:
13 buf breaking --against '.git#branch=main'
14
15# Run tests
16test:
17 go test ./...
18
19# Build the relay
20build:
21 go build -o bin/relay ./cmd/relay
22
23# Clean generated files
24clean:
25 rm -rf api/
26 rm -f bin/relay
27
28# Install buf (if not already installed)
29install-buf:
30 @if ! command -v buf &> /dev/null; then \
31 echo "Installing buf..."; \
32 mkdir -p ~/.local/bin; \
33 curl -sSL "https://github.com/bufbuild/buf/releases/latest/download/buf-$$(uname -s)-$$(uname -m)" -o ~/.local/bin/buf; \
34 chmod +x ~/.local/bin/buf; \
35 echo "buf installed to ~/.local/bin/buf"; \
36 echo "Make sure ~/.local/bin is in your PATH"; \
37 else \
38 echo "buf is already installed"; \
39 fi