v0.5.0 c37833b

Makefile RawHistoryFolder

1.PHONY: install test test-installer lint mocks demo remote-acceptance protocol protocol-check
2
3install:
4	go install .
5	@bin="$$(go env GOBIN)"; \
6	if [ -z "$$bin" ]; then bin="$$(go env GOPATH)/bin"; fi; \
7	mkdir -p "$$bin"; \
8	install -m 0755 scripts/vev-bar-top-right scripts/vev-bar-bottom-right "$$bin"
9
10test:
11	go test ./... -race
12
13test-installer:
14	sh scripts/install_platform_test.sh
15
16# Generated *.pb.go files are byte-reproducible via protocol-check and
17# are never edited; protoc-gen-go import grouping is not
18# goimports-clean, so lint covers hand-written sources only.
19lint:
20	@test -z "$$(for f in $$(git ls-files --cached --others --exclude-standard '*.go' | grep -v '\.pb\.go$$'); do test -f "$$f" && printf '%s\n' "$$f"; done | xargs -r goimports -l)"
21	go vet ./...
22
23mocks:
24	@version="$$(mockery version 2>/dev/null || true)"; \
25	if [ "$$version" != "v3.8.0" ]; then \
26		echo "mockery v3.8.0 required; install with: go install github.com/vektra/mockery/v3@v3.8.0" >&2; \
27		exit 1; \
28	fi
29	mockery
30
31remote-acceptance:
32	scripts/remote-picker-harness/run.sh
33
34# protocol regenerates the Protobuf wire contract from
35# internal/protocol/wire/schema using the pinned Go tools (buf + protoc-gen-go).
36protocol:
37	go tool buf lint
38	go tool buf format --diff --exit-code
39	go tool buf generate
40
41# protocol-check verifies the checked-in generated code is current: it
42# regenerates into a temporary directory and diffs the full file set.
43protocol-check:
44	go tool buf lint
45	go tool buf format --diff --exit-code
46	tmp="$$(mktemp -d)"; \
47	trap 'rm -rf "$$tmp"' EXIT; \
48	go tool buf generate --output "$$tmp"; \
49	genfile="$$(find "$$tmp" -name 'envelope.pb.go' -print -quit)"; \
50	test -n "$$genfile" || { echo "buf generate produced no envelope.pb.go"; exit 1; }; \
51	genroot="$$(dirname "$$genfile")"; \
52	for f in internal/protocol/wire/*.pb.go; do b="$$(basename "$$f")"; cmp -s "$$genroot/$$b" "$$f" || { echo "stale generated file: $$f"; exit 1; }; done; \
53	genfiles="$$(cd "$$genroot" && ls *.pb.go | sort)"; \
54	repofiles="$$(cd internal/protocol/wire && ls *.pb.go | sort)"; \
55	test "$$genfiles" = "$$repofiles" || { echo "generated file set differs"; echo "generated: $$genfiles"; echo "checked in: $$repofiles"; exit 1; }; \
56	test -z "$$(git status --porcelain -- internal/protocol/wire/*.pb.go)"
57
58demo:
59	go build -o build/vev .
60	docker build -f scripts/demo/Dockerfile -t vev-demo .
61	./scripts/demo/run.sh demo.tape
62	# vhs cannot emit a transparent margin, so cut the window out after the
63	# fact: everything outside the rounded window rect becomes GIF
64	# transparency, plus a 2px edge stroked along the window. The geometry
65	# mirrors demo.tape (1200x750 canvas, margin 20, border radius 10); keep
66	# them in sync. ffmpeg streams the clip frame by frame, so peak memory
67	# stays flat; the previous imagemagick -coalesce pipeline needed the whole
68	# ~22GiB uncompressed clip at once and either crawled for an hour on its
69	# disk cache or got OOM-killed — do not go back to it.
70	docker run --rm --entrypoint magick -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
71		-size 1200x750 xc:none -fill none -stroke "#30363D" -strokewidth 2 \
72		-draw "roundrectangle 21,21 1178,728 9,9" /out/border.png
73	docker run --rm --entrypoint magick -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
74		-size 1200x750 xc:black -fill white \
75		-draw "roundrectangle 20,20 1179,729 10,10" /out/mask.png
76	# alphamerge applies the mask after the border overlay so the mask clips
77	# the stroke's antialiased overflow, which a GIF's 1-bit alpha cannot
78	# represent; paletteuse's alpha_threshold folds the rest into that 1-bit
79	# alpha (palettegen reserves the transparent slot).
80	docker run --rm --entrypoint ffmpeg -v "$(CURDIR)/scripts/demo/out:/out" vev-demo \
81		-y -v error -i /out/demo.gif -i /out/border.png -i /out/mask.png \
82		-filter_complex "[0:v][1:v]overlay=0:0[bordered];[2:v]format=gray[m];[bordered][m]alphamerge,split[a][b];[a]palettegen=reserve_transparent=1[p];[b][p]paletteuse=alpha_threshold=128" \
83		/out/demo-masked.gif
84	# Keep the final GIF lossless: the streaming FFmpeg pass has already
85	# bounded memory, and preserving terminal chrome avoids color banding.
86	docker run --rm --entrypoint gifsicle -v "$(CURDIR)/scripts/demo/out:/out" vev-demo --no-conserve-memory -O3 -o /out/demo.gif /out/demo-masked.gif
87	# Temp files are owned by the container's subuid, so remove them from
88	# inside a container rather than the host.
89	docker run --rm --entrypoint sh -v "$(CURDIR)/scripts/demo/out:/out" vev-demo -c 'rm /out/demo-masked.gif /out/mask.png /out/border.png'
90	mkdir -p docs/assets
91	cp scripts/demo/out/demo.gif docs/assets/demo.gif

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close