-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 982 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 982 Bytes
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
.PHONY: build dev generate test infra migrate-db help
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 " 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