persona-community-2/services/persona-api/Makefile
2026-02-23 10:54:06 +00:00

39 lines
676 B
Makefile

.PHONY: build run dev test lint fmt docker-build clean
SERVICE := persona-api
BINARY := bin/$(SERVICE)
GO_MODULE := git.threesix.ai/jordan/persona-community-2
# Build the service binary
build:
go build -o $(BINARY) ./cmd/server
# Run the service locally
run:
go run ./cmd/server
# Run the service in development mode (alias for run)
dev:
go run ./cmd/server
# Run tests
test:
go test -v ./...
# Run linter
lint:
golangci-lint run ./...
# Format code
fmt:
gofmt -w .
goimports -w -local $(GO_MODULE) .
# Build Docker image (run from monorepo root)
docker-build:
docker build -t $(SERVICE):latest -f Dockerfile ../..
# Clean build artifacts
clean:
rm -rf bin/