Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (39 loc) · 1.47 KB
/
Copy pathMakefile
File metadata and controls
51 lines (39 loc) · 1.47 KB
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
45
46
47
48
49
50
51
.PHONY: build dev generate test infra migrate-db help build-mcp dev-mcp test-mcp lint-mcp generate-identity
help:
@echo "Available commands:"
@echo " build Build the widget-layout-backend binary"
@echo " dev Run the application in development mode"
@echo " generate Run go generate on all packages"
@echo " generate-identity Generate a user identity for development"
@echo " test Run all unit tests with coverage"
@echo " infra Start local infrastructure with Docker Compose"
@echo " migrate-db Run the database migration script"
@echo " build-mcp Build the MCP sidecar Docker image"
@echo " dev-mcp Run MCP sidecar in development mode"
@echo " test-mcp Run MCP sidecar tests"
@echo " lint-mcp Lint MCP sidecar TypeScript code"
@echo " help Show this help message"
build:
go build -o bin/widget-layout-backend .
dev:
go run .
generate:
go generate ./...
test:
go test -coverprofile=coverage.out ./... -v
@go tool cover -html=coverage.out -o coverage.html
infra:
docker-compose --env-file .env -f local/database-compose.yaml up
migrate-db:
go run cmd/database/migrate.go
generate-identity:
go run cmd/dev/user-identity.go
# MCP Sidecar targets
build-mcp:
cd mcp && docker build -t widget-layout-mcp:latest .
dev-mcp:
cd mcp && npm run dev
test-mcp:
cd mcp && npm test
lint-mcp:
cd mcp && npm run lint