-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (18 loc) · 768 Bytes
/
Copy pathMakefile
File metadata and controls
22 lines (18 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: run build migrate seed-sample
# Build all binaries into bin/.
build:
go build -o bin/altern ./app/main/altern
go build -o bin/migrate ./app/main/migrate
go build -o bin/seed ./app/main/seed
# Run the app with hot reload (watches Go files and views/).
# Uses `air` via `go run` so no global install is required —
# the first run populates the module cache; subsequent runs are instant.
run:
go run github.com/air-verse/air@latest -c .air.toml
# Apply database migrations (AutoMigrate all models).
migrate:
go run ./app/main/migrate
# Seed the database with sample data (50 tools, 10 users, 10 lists, 20 categories).
# Bails out if tools already exist. Use FORCE=1 to wipe and re-seed.
seed-sample:
go run ./app/main/seed $(if $(FORCE),--force,)