Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (56 loc) · 2.31 KB
/
Copy pathMakefile
File metadata and controls
78 lines (56 loc) · 2.31 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# DEEIX Chat — single entry point for local development.
# `make` / `make help` lists targets. Package-level tooling (pnpm, turbo, cargo,
# go) stays where it is; this file only routes to it so nothing needs a `cd`.
.DEFAULT_GOAL := help
SHELL := /bin/bash
PNPM ?= pnpm
.PHONY: help setup dev api web desktop build build-api build-web build-desktop \
release-desktop check test verify lint fmt api-docs version version-check clean
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage: make <target>\n\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n%s\n", substr($$0, 5) }' $(MAKEFILE_LIST)
##@ Setup
setup: ## Install JS dependencies and Go modules
$(PNPM) install
cd backend && go mod download
##@ Develop
dev: ## Run API + web together (turbo)
$(PNPM) dev
api: ## Run the Go API (backend/config.yaml)
$(MAKE) -C backend run
web: ## Run the web app at http://localhost:3000
$(PNPM) --filter @deeix/web dev
desktop: ## Run the desktop app (dev identifier, own data dir)
$(PNPM) --filter @deeix/desktop dev
##@ Build
build: ## Build every workspace (turbo, cached)
$(PNPM) build
build-api: ## Build the Go server into .cache/deeix-chat/
$(MAKE) -C backend build
build-web: ## Static export of the web app into apps/web/out
$(PNPM) --filter @deeix/web build
build-desktop: ## Quick local desktop build (.app only, relaxed LTO)
$(PNPM) --filter @deeix/desktop build:app
release-desktop: ## Desktop release build, signed when deploy/secrets/desktop-signing.env is filled
$(PNPM) --filter @deeix/desktop build:signed
##@ Quality
check: ## Lint + typecheck + architecture rules, all workspaces
$(PNPM) check
test: ## Tests, all workspaces
$(PNPM) test
verify: ## check + test + build (what CI runs)
$(PNPM) verify
lint: ## Go lint + JS lint
$(MAKE) -C backend lint
$(PNPM) -r --parallel --if-present lint
fmt: ## Format Go and JS sources
$(MAKE) -C backend fmt
$(PNPM) -r --parallel --if-present lint:fix
##@ Maintenance
api-docs: ## Regenerate Swagger docs and the TypeScript API contract
$(PNPM) api:generate
version: ## Synchronize VERSION, manifests, Cargo.lock and generated API contracts
$(PNPM) api:generate
version-check: ## Check version consistency and generated API contracts
$(PNPM) api:check
clean: ## Remove build outputs
$(PNPM) clean