| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- # Makefile for broad-announce
- #
- # Dev targets:
- # make proto — regenerate Go stubs from .proto files
- # make vet — run go vet on all packages
- # make build — build all Go binaries
- # make test — run Go unit tests
- # make web-install — pnpm install in web/
- # make web-build — build the SPA into web/dist/
- # make web-dev — vite dev server on :5173
- # make web-test — vitest run in web/
- # make web-typecheck — tsc --noEmit
- # make build — builds Go + embeds web/dist into admind
- .PHONY: proto vet build test web-install web-build web-dev web-test web-typecheck build-with-web
- PROTO_DIR := proto
- GEN_DIR := gen/go
- BUF := buf
- # proto regenerates the Go stubs from .proto sources.
- # Run this whenever you edit anything under proto/.
- proto:
- cd $(PROTO_DIR) && \
- $(BUF) lint --config $(PROTO_DIR)/buf.yaml . && \
- $(BUF) generate --template $(PROTO_DIR)/buf.gen.yaml $(PROTO_DIR)/
- go build ./$(GEN_DIR)/...
- vet:
- go vet ./...
- build:
- go build ./cmd/...
- test:
- go test ./...
- # ── Frontend (M13b W0) ─────────────────────────────────────────────
- # web-install runs pnpm install for the web workspace.
- # Idempotent; uses the local pnpm-store at .pnpm-store.
- web-install:
- pnpm install --frozen-lockfile=false
- # web-build produces web/dist/ that the admind binary embeds
- # via //go:embed web/dist/*.
- web-build:
- cd web && pnpm run build
- # web-dev starts the Vite dev server on :5173 with proxy
- # rules so /v1/* goes to the local stack. Bring up the stack
- # (docker compose up -d) before running this.
- web-dev:
- cd web && pnpm run dev
- # web-test runs the vitest unit tests.
- web-test:
- cd web && pnpm run test
- # web-typecheck runs tsc without emitting.
- web-typecheck:
- cd web && pnpm exec tsc --noEmit
- # build-with-web runs the SPA build first, then builds all
- # Go binaries so admind picks up the freshly built web/dist.
- build-with-web: web-build build
- # ── M13a smoke ────────────────────────────────────────────────────
- M13A_SMOKE = bash scripts/m13a_smoke.sh
- m13a-smoke:
- $(M13A_SMOKE)
- # ── M13b smoke (W4: integration smoke across W1+W2+W3) ────────────
- # Composed of scripts/m13b_smoke.sh:
- # 1. health, 2. login, 3. create tenant, 4. bootstrap tenant_admin,
- # 5. tenant_admin login, 6. create source, 7. ingest (CONDITIONAL,
- # skipped if ingestd not running), 8. list sources, 9. suspend,
- # 10. ingest rejected on suspended (CONDITIONAL), 11-13. cross-tenant
- # 403 (tenant, source list, source POST), 14. tenant_admin own
- # tenant OK, 15. create telegram bot (bot_token NOT in response),
- # 16. invite → magic_link_token, 17. cleanup.
- # Exits 0 if all runnable steps pass.
- M13B_SMOKE = bash scripts/m13b_smoke.sh
- m13b-smoke:
- $(M13B_SMOKE)
- # ── Per-workstream smokes (already on master) ──────────────────────
- # make w1-smoke → companies CRUD (15 steps)
- # make w2-smoke → sources CRUD (19 steps)
- # make w3-smoke → telegram bots CRUD (32 steps)
- W1_SMOKE = bash scripts/m13b_w1_smoke.sh
- W2_SMOKE = bash scripts/m13b_w2_smoke.sh
- W3_SMOKE = bash scripts/m13b_w3_smoke.sh
- w1-smoke:
- $(W1_SMOKE)
- w2-smoke:
- $(W2_SMOKE)
- w3-smoke:
- $(W3_SMOKE)
- # ── M13b full suite: all per-W smokes + the integration smoke ──────
- # Use this to gate a release. Each smoke must exit 0.
- .PHONY: m13b-full
- m13b-full: w1-smoke w2-smoke w3-smoke m13b-smoke
- @echo "m13b full suite: PASS"
|