forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (71 loc) · 3.54 KB
/
Copy pathMakefile
File metadata and controls
95 lines (71 loc) · 3.54 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
HOOKS_DIR := $(shell git rev-parse --git-path hooks)
# Fall back to the working directory (where make runs, i.e. the repo root) when
# `git rev-parse --show-toplevel` cannot resolve a work tree. In a linked
# worktree whose git context resolves to a git dir rather than a work tree,
# show-toplevel exits 128 and previously expanded to an empty prefix, turning
# the source into `/scripts/dev-harness/_resolve_python.sh: No such file` and
# breaking every target. The root stays computed in-shell (never interpolated
# into recipe text) so a checkout path with quote/`$` characters cannot inject.
PYTHON ?= $(shell bash -c 'source "$$(git rev-parse --show-toplevel 2>/dev/null || pwd)/scripts/dev-harness/_resolve_python.sh"; dev_harness_python')
# Export so recipes use $$PYTHON (shell variable expansion) instead of $(PYTHON)
# (Make text interpolation). Shell variable expansion treats the resolved path
# as data and cannot be broken by quote or command-substitution characters in
# the checkout root, unlike Make interpolation into recipe shell text.
export PYTHON
DESKTOP_USER ?= alice
DESKTOP_APP_NAME ?=
.PHONY: setup setup-main setup-hooks setup-backend preflight runtime-image-source-closure runtime-image-smoke dev-check dev-up dev-status dev-summary dev-reset dev-down dev-logs dev dev-desktop dev-init dev-verify list-memory-scenarios seed-memory-scenario reset-memory-scenario desktop-run-local run-canonical-promotion
# Baseline setup is deliberately limited to prerequisites that the default
# pre-push gate may require; app and desktop runtime environments stay opt-in.
setup: setup-main setup-hooks setup-backend
@echo "Worktree setup complete: hooks installed and backend pre-push environment ready."
setup-main:
@bash scripts/setup-refresh-main.sh
setup-hooks:
@bash scripts/install-git-hooks.sh
setup-backend:
@bash backend/scripts/sync-python-deps.sh
preflight:
python3 .github/scripts/pr_preflight.py --lane local --base origin/main
runtime-image-source-closure:
python3 backend/scripts/runtime_image_contracts.py check
runtime-image-smoke:
@test -n "$(SERVICE)" || (echo "SERVICE is required (for example: make runtime-image-smoke SERVICE=pusher)" >&2; exit 2)
python3 backend/scripts/runtime_image_contracts.py build-smoke --service "$(SERVICE)" --image "$(or $(IMAGE),omi-$(SERVICE):dev)"
dev-check:
bash scripts/dev-harness/dev-check.sh
dev-up:
bash scripts/dev-harness/dev-up.sh
dev:
$(MAKE) dev-up
dev-desktop:
$(MAKE) dev
$(MAKE) desktop-run-local
dev-init:
bash scripts/dev-harness/dev-init.sh
dev-verify:
bash scripts/dev-harness/verify-desktop-local-launch.sh
dev-status:
bash scripts/dev-harness/dev-status.sh
dev-summary:
bash scripts/dev-harness/dev-summary.sh
dev-reset:
bash scripts/dev-harness/dev-reset.sh
dev-down:
bash scripts/dev-harness/dev-down.sh
dev-logs:
bash scripts/dev-harness/dev-logs.sh
list-memory-scenarios:
"$$PYTHON" scripts/dev-harness/list-memory-scenarios.py
seed-memory-scenario:
"$$PYTHON" scripts/dev-harness/seed-memory-scenario.py $(SCENARIO)
reset-memory-scenario:
"$$PYTHON" scripts/dev-harness/reset-memory-scenario.py $(SCENARIO)
desktop-run-local:
@if [ -n "$(DESKTOP_APP_NAME)" ]; then \
PYTHON="$$PYTHON" OMI_APP_NAME="$(DESKTOP_APP_NAME)" bash scripts/dev-harness/desktop-run-local.sh "$(DESKTOP_USER)"; \
else \
PYTHON="$$PYTHON" bash scripts/dev-harness/desktop-run-local.sh "$(DESKTOP_USER)"; \
fi
run-canonical-promotion:
PYTHON="$$PYTHON" PYTHONPATH="scripts/dev-harness:backend$(if $(PYTHONPATH),:$(PYTHONPATH),)" "$$PYTHON" scripts/dev-harness/run-canonical-promotion.py "$(PROMOTION_USER)"