Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (58 loc) · 2.56 KB
/
Copy pathMakefile
File metadata and controls
72 lines (58 loc) · 2.56 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
T3CODE_VER ?= 0.1.11
IMAGE ?= ghcr.io/tikoci/app-t3code
PLATFORMS ?= linux/amd64,linux/arm64
.PHONY: check lint lint-shell lint-actions lint-md test freshness share-link integration build push dev-lock
check:
bun run check
# Every lint gate CI runs: biome + tsc + markdownlint (bun run check), then the
# shell and workflow linters, which need hadolint, shellcheck and actionlint
# on PATH.
lint: check lint-shell lint-actions
# The Dockerfile (hadolint, which also runs ShellCheck on its RUN steps) and
# every shell script that ships in the image or runs in its tests. CI runs
# this with pinned, checksum-verified hadolint and ShellCheck (ci.yml).
SHELL_SCRIPTS = bin/* docker-entrypoint.sh profile.sh scripts/install-pairing-help.sh scripts/freshness-issue.sh test/*.sh
lint-shell:
hadolint Dockerfile
shellcheck $(SHELL_SCRIPTS)
# The workflows in .github/workflows. actionlint also runs ShellCheck on each
# `run:` script when shellcheck is on PATH. CI pins it like hadolint.
lint-actions:
actionlint
lint-md:
bun run lint:md
test:
bun run test
# Drift checks (scripts/freshness.ts): the README share link, T3CODE_VER's
# release and its harness catalog, the newest stable T3, and Claude Code's
# download channel and manifest (bin/install-claude-code). Needs network;
# CI runs `pinned` on every PR and everything on a schedule (freshness.yml).
freshness:
bun scripts/freshness.ts all --version $(T3CODE_VER)
# Regenerate the README's /app YAML Editor link from app/t3code.tikapp.yaml.
share-link:
bun scripts/freshness.ts share-link --write
integration:
bun run test:integration
build:
docker buildx build --platform $(PLATFORMS) \
--build-arg T3CODE_VER=$(T3CODE_VER) \
-t $(IMAGE):$(T3CODE_VER) .
push:
docker buildx build --platform $(PLATFORMS) --push \
--build-arg T3CODE_VER=$(T3CODE_VER) \
-t $(IMAGE):$(T3CODE_VER) \
-t $(IMAGE):latest \
.
# Refresh the dev tool group's pinned lockfile after editing
# lib/groups/dev/package.json. A changed lockfile gives every installed
# home a new payload on its next start (security refresh). `npm update`
# re-resolves transitive dependencies within their ranges (direct ones are
# exact pins) on a temp copy; the committed lockfile is replaced only if npm
# succeeds.
dev-lock:
@tmp=$$(mktemp -d) && trap 'rm -rf "$$tmp"' EXIT && \
cp lib/groups/dev/package.json lib/groups/dev/package-lock.json "$$tmp/" && \
(cd "$$tmp" && npm update --package-lock-only --ignore-scripts --no-audit --no-fund) && \
cp "$$tmp/package-lock.json" lib/groups/dev/package-lock.json && \
echo "updated lib/groups/dev/package-lock.json"