-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (54 loc) · 2.24 KB
/
Copy pathMakefile
File metadata and controls
63 lines (54 loc) · 2.24 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
hooks:
@if [ "$$(git config --local --get core.hooksPath)" = ".github/hooks" ]; then \
echo "pre-commit hooks already active (core.hooksPath=.github/hooks)"; \
else \
printf 'Enable this repo'\''s git hooks? Runs:\n git config --local core.hooksPath .github/hooks\nProceed? [y/N] '; \
read ans; \
case "$$ans" in \
[yY]|[yY][eE][sS]) git config --local core.hooksPath .github/hooks && echo "hooks enabled -> .github/hooks";; \
*) echo "skipped";; \
esac; \
fi
bench:
@uv run python ops/bench.py $(BENCH_ARGS)
pr-info:
@echo "| Key | Value |"
@echo "|-----|-------|"
@printf "| OS | %s |\n" "$$(uname -a)"
@printf "| Claude Code | %s |\n" "$$(claude --version 2>/dev/null || echo 'not installed')"
@printf "| Terminal | TERM=$$TERM TERM_PROGRAM=$$TERM_PROGRAM SHELL=$$SHELL COLORTERM=$$COLORTERM |\n"
@printf "| Locale | LANG=$$LANG LC_ALL=$$LC_ALL |\n"
@printf "| Python | %s |\n" "$$(python3 -V 2>&1)"
@printf "| uv | %s |\n" "$$(uv --version 2>/dev/null || echo 'not installed')"
demo:
@uv run python3 ops/demo.py
# Renders every scenario .txt (plus per-theme kitchen-sink renders) into demo/.
# Set DEMO_ONLY=<scenario-name> to render just one scenario's .txt, e.g.
# DEMO_ONLY=tasks make demo/img
# With DEMO_ONLY set, also emits a deterministic PNG screenshot next to the .txt
# (demo/<scenario>.png) via ops/ansi_png.py — handy for before/after PR shots.
# Font/size/colours are overridable; see ops/ansi_png.py for the env knobs:
# DEMO_ONLY=tasks YAS_DEMO_FONT='FiraCode Nerd Font Mono' make demo/img
demo/img:
@uv run python3 ops/demo.py --snapshots demo/
@if [ -n "$(DEMO_ONLY)" ]; then \
uv run python3 ops/ansi_png.py demo/$(DEMO_ONLY).txt demo/$(DEMO_ONLY).png; \
fi
test:
@uv run pytest -q
statusline/test:
@uv run python ops/demo.py
mon/run:
uv run python claude/mon.py
# usage:
# VERSION=0.X.Y make version/bump
version/bump:
# update plugin.json
sed -i 's/$(shell uv version --short)/$(VERSION)/g' .claude-plugin/plugin.json
# update pyproject.toml & uv.lock
uv version $(VERSION)
@uv lock && uv sync --all-groups
@git add .claude-plugin/plugin.json pyproject.toml uv.lock
@git commit -m "Bump version to $(VERSION)"
@git push
.PHONY: hooks bench pr-info demo demo/img test statusline/test mon/run version/bump