Files
broker/Makefile
T
zeekay 4532862f22 fix: use query-param format for crypto bars (sandbox single path 404s)
Same issue as snapshots — Alpaca sandbox returns 404 for
/v1beta3/crypto/us/{sym}/bars but works with
/v1beta3/crypto/us/bars?symbols={sym}. Also handle the wrapped
response format {"bars":{"BTC/USD":[...]}} vs stock {"bars":[...]}.
2025-12-24 00:57:08 -07:00

38 lines
929 B
Makefile

.PHONY: build run test test-race lint proto docker docker-push tag clean
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
build:
go build -ldflags="-s -w -X main.version=$(VERSION)" -o brokerd ./cmd/brokerd/
run: build
ALPACA_API_KEY=$(ALPACA_API_KEY) ALPACA_API_SECRET=$(ALPACA_API_SECRET) ./brokerd
test:
go test -count=1 ./...
test-race:
go test -race -count=1 ./...
lint:
go vet ./...
proto:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
proto/broker.proto
docker:
docker build --platform linux/amd64 -t ghcr.io/luxfi/broker:$(VERSION) -t ghcr.io/luxfi/broker:latest .
docker-push:
docker push ghcr.io/luxfi/broker:$(VERSION)
docker push ghcr.io/luxfi/broker:latest
tag:
@echo "Current version: $(VERSION)"
@echo "Usage: git tag -a v0.X.0 -m 'release v0.X.0' && git push origin v0.X.0"
clean:
rm -f brokerd