detached 29077b4

feat(install): support Linux ARM64 releases

commit
29077b44d78bf7ba928c1f3d2a4f6dd1db79c50b
author
brice · · 2026-07-18 14:45 UTC
committer
brice · · 2026-07-18 14:53 UTC
parent
f40c90d
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +82 -5
M Makefile +4 -1
@@ -1,4 +1,4 @@
1-.PHONY: install test lint mocks
1+.PHONY: install test test-installer lint mocks
22
33 install:
44 go install .
@@ -10,6 +10,9 @@ install:
1010 test:
1111 go test ./... -race
1212
13+test-installer:
14+ sh scripts/install_platform_test.sh
15+
1316 lint:
1417 @test -z "$$(goimports -l .)"
1518 go vet ./...
@@ -1,4 +1,4 @@
1-.PHONY: install test lint mocks1+.PHONY: install test test-installer lint mocks
2 2
3 install:3 install:
4 go install .4 go install .
@@ -10,6 +10,9 @@ install:
10 test:10 test:
11 go test ./... -race11 go test ./... -race
12 12
13+test-installer:
14+ sh scripts/install_platform_test.sh
15+
13 lint:16 lint:
14 @test -z "$$(goimports -l .)"17 @test -z "$$(goimports -l .)"
15 go vet ./...18 go vet ./...
M install.sh +5 -4
@@ -1,5 +1,5 @@
11 #!/bin/sh
2-# vev installer — Linux x86_64 and macOS arm64.
2+# vev installer — Linux x86_64/arm64 and macOS arm64.
33 # Usage: curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh
44 # Env: VEV_VERSION=vX.Y.Z to pin a version (default: latest release).
55 set -eu
@@ -14,9 +14,10 @@ err() { printf '\033[1;31merror:\033[0m %s\n' "$*" >&2; exit 1; }
1414 OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
1515 ARCH="$(uname -m)"
1616 case "$OS/$ARCH" in
17- linux/x86_64|linux/amd64) TARBALL="vev_linux_x86_64.tar.gz" ;;
18- darwin/arm64) TARBALL="vev_darwin_arm64.tar.gz" ;;
19- *) err "unsupported platform: $OS/$ARCH (supported: linux/x86_64, darwin/arm64)" ;;
17+ linux/x86_64|linux/amd64) TARBALL="vev_linux_x86_64.tar.gz" ;;
18+ linux/aarch64|linux/arm64) TARBALL="vev_linux_arm64.tar.gz" ;;
19+ darwin/arm64) TARBALL="vev_darwin_arm64.tar.gz" ;;
20+ *) err "unsupported platform: $OS/$ARCH (supported: linux/x86_64, linux/arm64, darwin/arm64)" ;;
2021 esac
2122
2223 # --- Pick install dir ------------------------------------------------------
@@ -1,5 +1,5 @@
1 #!/bin/sh1 #!/bin/sh
2-# vev installer — Linux x86_64 and macOS arm64.2+# vev installer — Linux x86_64/arm64 and macOS arm64.
3 # Usage: curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh3 # Usage: curl -fsSL https://raw.githubusercontent.com/bnema/vev/main/install.sh | sh
4 # Env: VEV_VERSION=vX.Y.Z to pin a version (default: latest release).4 # Env: VEV_VERSION=vX.Y.Z to pin a version (default: latest release).
5 set -eu5 set -eu
@@ -14,9 +14,10 @@ err() { printf '\033[1;31merror:\033[0m %s\n' "$*" >&2; exit 1; }
14 OS="$(uname -s | tr '[:upper:]' '[:lower:]')"14 OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
15 ARCH="$(uname -m)"15 ARCH="$(uname -m)"
16 case "$OS/$ARCH" in16 case "$OS/$ARCH" in
17- linux/x86_64|linux/amd64) TARBALL="vev_linux_x86_64.tar.gz" ;;17+ linux/x86_64|linux/amd64) TARBALL="vev_linux_x86_64.tar.gz" ;;
18- darwin/arm64) TARBALL="vev_darwin_arm64.tar.gz" ;;18+ linux/aarch64|linux/arm64) TARBALL="vev_linux_arm64.tar.gz" ;;
19- *) err "unsupported platform: $OS/$ARCH (supported: linux/x86_64, darwin/arm64)" ;;19+ darwin/arm64) TARBALL="vev_darwin_arm64.tar.gz" ;;
20+ *) err "unsupported platform: $OS/$ARCH (supported: linux/x86_64, linux/arm64, darwin/arm64)" ;;
20 esac21 esac
21 22
22 # --- Pick install dir ------------------------------------------------------23 # --- Pick install dir ------------------------------------------------------
A scripts/install_platform_test.sh +73 -0
@@ -0,0 +1,73 @@
1+#!/bin/sh
2+set -eu
3+
4+ROOT_DIR=$(CDPATH='' cd "$(dirname "$0")/.." && pwd)
5+TEST_DIR=$(mktemp -d)
6+trap 'rm -rf "$TEST_DIR"' EXIT HUP INT TERM
7+
8+FAKE_BIN="$TEST_DIR/bin"
9+mkdir -p "$FAKE_BIN"
10+
11+cat >"$FAKE_BIN/uname" <<'EOF'
12+#!/bin/sh
13+case "${1:-}" in
14+ -s) printf '%s\n' "$FAKE_OS" ;;
15+ -m) printf '%s\n' "$FAKE_ARCH" ;;
16+ *) exit 2 ;;
17+esac
18+EOF
19+
20+cat >"$FAKE_BIN/curl" <<'EOF'
21+#!/bin/sh
22+printf '%s\n' "$*" >>"$CURL_LOG"
23+exit 97
24+EOF
25+
26+chmod +x "$FAKE_BIN/uname" "$FAKE_BIN/curl"
27+
28+fail() {
29+ printf 'FAIL: %s\n' "$*" >&2
30+ exit 1
31+}
32+
33+assert_mapping() {
34+ os=$1
35+ arch=$2
36+ tarball=$3
37+ curl_log="$TEST_DIR/curl-$os-$arch.log"
38+ output="$TEST_DIR/output-$os-$arch.log"
39+
40+ if FAKE_OS=$os FAKE_ARCH=$arch CURL_LOG=$curl_log HOME="$TEST_DIR/home" \
41+ PATH="$FAKE_BIN:$PATH" VEV_VERSION=v0.0.0 \
42+ sh "$ROOT_DIR/install.sh" >"$output" 2>&1; then
43+ fail "$os/$arch unexpectedly completed installation"
44+ fi
45+
46+ expected_url="https://github.com/bnema/vev/releases/download/v0.0.0/$tarball"
47+ [ -f "$curl_log" ] || fail "$os/$arch did not attempt a download"
48+ grep -F "$expected_url" "$curl_log" >/dev/null \
49+ || fail "$os/$arch did not select $tarball"
50+ [ "$(wc -l <"$curl_log" | tr -d ' ')" = 1 ] \
51+ || fail "$os/$arch attempted more than the archive download"
52+}
53+
54+assert_mapping Linux x86_64 vev_linux_x86_64.tar.gz
55+assert_mapping Linux amd64 vev_linux_x86_64.tar.gz
56+assert_mapping Linux aarch64 vev_linux_arm64.tar.gz
57+assert_mapping Linux arm64 vev_linux_arm64.tar.gz
58+assert_mapping Darwin arm64 vev_darwin_arm64.tar.gz
59+
60+curl_log="$TEST_DIR/curl-Linux-armv7l.log"
61+output="$TEST_DIR/output-Linux-armv7l.log"
62+if FAKE_OS=Linux FAKE_ARCH=armv7l CURL_LOG=$curl_log HOME="$TEST_DIR/home" \
63+ PATH="$FAKE_BIN:$PATH" VEV_VERSION=v0.0.0 \
64+ sh "$ROOT_DIR/install.sh" >"$output" 2>&1; then
65+ fail "Linux/armv7l unexpectedly succeeded"
66+fi
67+grep -F "unsupported platform: linux/armv7l" "$output" >/dev/null \
68+ || fail "Linux/armv7l did not report an unsupported platform"
69+grep -F "supported: linux/x86_64, linux/arm64, darwin/arm64" "$output" >/dev/null \
70+ || fail "Linux/armv7l did not list the canonical supported platforms"
71+[ ! -e "$curl_log" ] || fail "Linux/armv7l invoked curl before rejection"
72+
73+printf 'installer platform tests passed\n'
@@ -0,0 +1,73 @@
1+#!/bin/sh
2+set -eu
3+
4+ROOT_DIR=$(CDPATH='' cd "$(dirname "$0")/.." && pwd)
5+TEST_DIR=$(mktemp -d)
6+trap 'rm -rf "$TEST_DIR"' EXIT HUP INT TERM
7+
8+FAKE_BIN="$TEST_DIR/bin"
9+mkdir -p "$FAKE_BIN"
10+
11+cat >"$FAKE_BIN/uname" <<'EOF'
12+#!/bin/sh
13+case "${1:-}" in
14+ -s) printf '%s\n' "$FAKE_OS" ;;
15+ -m) printf '%s\n' "$FAKE_ARCH" ;;
16+ *) exit 2 ;;
17+esac
18+EOF
19+
20+cat >"$FAKE_BIN/curl" <<'EOF'
21+#!/bin/sh
22+printf '%s\n' "$*" >>"$CURL_LOG"
23+exit 97
24+EOF
25+
26+chmod +x "$FAKE_BIN/uname" "$FAKE_BIN/curl"
27+
28+fail() {
29+ printf 'FAIL: %s\n' "$*" >&2
30+ exit 1
31+}
32+
33+assert_mapping() {
34+ os=$1
35+ arch=$2
36+ tarball=$3
37+ curl_log="$TEST_DIR/curl-$os-$arch.log"
38+ output="$TEST_DIR/output-$os-$arch.log"
39+
40+ if FAKE_OS=$os FAKE_ARCH=$arch CURL_LOG=$curl_log HOME="$TEST_DIR/home" \
41+ PATH="$FAKE_BIN:$PATH" VEV_VERSION=v0.0.0 \
42+ sh "$ROOT_DIR/install.sh" >"$output" 2>&1; then
43+ fail "$os/$arch unexpectedly completed installation"
44+ fi
45+
46+ expected_url="https://github.com/bnema/vev/releases/download/v0.0.0/$tarball"
47+ [ -f "$curl_log" ] || fail "$os/$arch did not attempt a download"
48+ grep -F "$expected_url" "$curl_log" >/dev/null \
49+ || fail "$os/$arch did not select $tarball"
50+ [ "$(wc -l <"$curl_log" | tr -d ' ')" = 1 ] \
51+ || fail "$os/$arch attempted more than the archive download"
52+}
53+
54+assert_mapping Linux x86_64 vev_linux_x86_64.tar.gz
55+assert_mapping Linux amd64 vev_linux_x86_64.tar.gz
56+assert_mapping Linux aarch64 vev_linux_arm64.tar.gz
57+assert_mapping Linux arm64 vev_linux_arm64.tar.gz
58+assert_mapping Darwin arm64 vev_darwin_arm64.tar.gz
59+
60+curl_log="$TEST_DIR/curl-Linux-armv7l.log"
61+output="$TEST_DIR/output-Linux-armv7l.log"
62+if FAKE_OS=Linux FAKE_ARCH=armv7l CURL_LOG=$curl_log HOME="$TEST_DIR/home" \
63+ PATH="$FAKE_BIN:$PATH" VEV_VERSION=v0.0.0 \
64+ sh "$ROOT_DIR/install.sh" >"$output" 2>&1; then
65+ fail "Linux/armv7l unexpectedly succeeded"
66+fi
67+grep -F "unsupported platform: linux/armv7l" "$output" >/dev/null \
68+ || fail "Linux/armv7l did not report an unsupported platform"
69+grep -F "supported: linux/x86_64, linux/arm64, darwin/arm64" "$output" >/dev/null \
70+ || fail "Linux/armv7l did not list the canonical supported platforms"
71+[ ! -e "$curl_log" ] || fail "Linux/armv7l invoked curl before rejection"
72+
73+printf 'installer platform tests passed\n'

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