55 lines
1.1 KiB
Makefile
55 lines
1.1 KiB
Makefile
SHELL := /bin/bash
|
|
|
|
.PHONY: install db-start db-init db-stop api web seed migrate bootstrap-admin smoke smoke-real test test-db build check
|
|
|
|
install:
|
|
cd server && go mod download
|
|
pnpm --dir web install
|
|
|
|
db-start:
|
|
@/opt/homebrew/opt/postgresql@17/bin/pg_isready >/dev/null 2>&1 || \
|
|
/opt/homebrew/opt/postgresql@17/bin/pg_ctl -D /opt/homebrew/var/postgresql@17 -l /tmp/callline-postgres.log start
|
|
|
|
db-init: db-start
|
|
./scripts/init-db.sh
|
|
|
|
db-stop:
|
|
@/opt/homebrew/opt/postgresql@17/bin/pg_ctl -D /opt/homebrew/var/postgresql@17 stop
|
|
|
|
api:
|
|
./scripts/run-api.sh
|
|
|
|
web:
|
|
pnpm --dir web dev
|
|
|
|
seed:
|
|
./scripts/seed.sh
|
|
|
|
migrate:
|
|
cd server && go run ./cmd/migrate
|
|
|
|
bootstrap-admin:
|
|
cd server && go run ./cmd/bootstrap-admin
|
|
|
|
smoke:
|
|
@test -n "$(DISPLAY_TOKEN)" || (echo "DISPLAY_TOKEN is required" && exit 2)
|
|
python3 scripts/smoke.py --display-token "$(DISPLAY_TOKEN)"
|
|
|
|
smoke-real: db-start
|
|
./scripts/smoke-real.sh
|
|
|
|
test:
|
|
cd server && go test ./...
|
|
pnpm --dir web test:run
|
|
|
|
test-db: db-start
|
|
./scripts/test-postgres.sh
|
|
|
|
build:
|
|
cd server && go build ./...
|
|
pnpm --dir web build
|
|
|
|
check:
|
|
cd server && go vet ./...
|
|
pnpm --dir web typecheck
|