-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (50 loc) · 1.73 KB
/
Copy pathMakefile
File metadata and controls
66 lines (50 loc) · 1.73 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
.PHONY: setup dev fake web sidecar test build clean spikes install uninstall app dist restart stop logs link
# First time: fetch deps, create the DB, build the sidecar.
setup:
cd server && mix setup
cd sidecar && npm install
cd web && npm install
$(MAKE) sidecar
sidecar:
cd sidecar && npm run build
web:
cd web && npm run build
# Phoenix on :4242 and Vite on :5173 (open http://127.0.0.1:5173). Ctrl-C stops both.
dev: sidecar
@trap 'kill 0' INT TERM EXIT; \
(cd server && mix phx.server) & \
(cd web && npm run dev) & \
wait
# Everything served by Phoenix from the built SPA (http://127.0.0.1:4242).
build: sidecar web
@echo "run: cd server && mix phx.server"
test:
cd server && mix test
cd sidecar && npm test && npm run typecheck
cd web && npx tsc -b
spikes:
./spikes/02-orphans.sh
./spikes/01-claude-sdk.sh
clean:
rm -rf server/_build server/priv/static sidecar/dist web/dist desktop/build dist
# macOS: build a release and run it at login via launchd (scripts/macos).
install:
./scripts/macos/install.sh
uninstall:
./scripts/macos/uninstall.sh
# macOS: Workbench.app in ~/Applications, a native window on the server from `make install`.
app:
./scripts/macos/build-app.sh
# macOS: dist/Workbench-<version>-<arch>.dmg with the server inside, for the website (see scripts/macos/package.sh).
dist:
./scripts/macos/package.sh
restart:
launchctl kickstart -k gui/$$(id -u)/dev.workbench.server
stop:
launchctl bootout gui/$$(id -u)/dev.workbench.server
logs:
tail -f $${WB_HOME:-$$HOME/.workbench}/logs/workbench.log
# M7: one-time login link for a browser on another machine (Tailscale).
# make link HOST=macmini
link:
@echo "http://$${HOST:-$$(hostname -s)}:$${PORT:-4242}/?token=$$(cat $${WB_HOME:-$$HOME/.workbench}/token)"