From 6c840f03524187d1f056fdaa70e5f1f9b24cf793 Mon Sep 17 00:00:00 2001 From: bndw Date: Fri, 13 Feb 2026 17:35:32 -0800 Subject: feat: add Protocol Buffer definitions and build tooling --- Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d01b68b --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +.PHONY: proto proto-lint proto-breaking test build clean + +# Generate proto files +proto: + buf generate + +# Lint proto files +proto-lint: + buf lint + +# Check for breaking changes +proto-breaking: + buf breaking --against '.git#branch=main' + +# Run tests +test: + go test ./... + +# Build the relay +build: + go build -o bin/relay ./cmd/relay + +# Clean generated files +clean: + rm -rf api/ + rm -f bin/relay + +# Install buf (if not already installed) +install-buf: + @if ! command -v buf &> /dev/null; then \ + echo "Installing buf..."; \ + mkdir -p ~/.local/bin; \ + curl -sSL "https://github.com/bufbuild/buf/releases/latest/download/buf-$$(uname -s)-$$(uname -m)" -o ~/.local/bin/buf; \ + chmod +x ~/.local/bin/buf; \ + echo "buf installed to ~/.local/bin/buf"; \ + echo "Make sure ~/.local/bin is in your PATH"; \ + else \ + echo "buf is already installed"; \ + fi -- cgit v1.2.3