detached 921cc59

feat(install): support pre-release version resolution

Resolve release tags via GitHub API so the installer can target latest stable, latest pre-release, or an explicit DUMBER_VERSION. Download URLs and checksums now use the resolved tag for consistent installs.
commit
921cc59655b251371eda043c9123d99b63ab829f
author
brice · · 2026-02-09 12:47 UTC
parent
4959fb8
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +36 -2
M install.sh +36 -2
@@ -3,8 +3,10 @@ set -e
33
44 # Dumber installer script
55 # Usage: curl -fsSL https://dumber.bnema.dev/install | sh
6+# Usage with pre-release: curl -fsSL https://dumber.bnema.dev/install | DUMBER_PRERELEASE=1 sh
67
78 REPO="bnema/dumber"
9+VERSION="${DUMBER_VERSION:-latest}"
810
911 # Prefer ~/.local/bin if it exists and is in PATH, otherwise /usr/local/bin
1012 if [ -d "$HOME/.local/bin" ]; then
@@ -36,14 +38,46 @@ fi
3638 echo "Detected: linux/x86_64"
3739
3840 TARBALL="dumber_linux_x86_64.tar.gz"
39-DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"
41+
42+# Determine version to download
43+if [ "$VERSION" = "latest" ] && [ -n "$DUMBER_PRERELEASE" ]; then
44+ echo "Finding latest pre-release..."
45+ RELEASE_DATA=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases?per_page=1" 2>/dev/null || echo "")
46+ if [ -z "$RELEASE_DATA" ]; then
47+ echo "Error: Failed to fetch release information from GitHub API"
48+ exit 1
49+ fi
50+ VERSION=$(echo "$RELEASE_DATA" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name":\s*"([^"]+)".*/\1/')
51+ if [ -z "$VERSION" ]; then
52+ echo "Error: Could not determine latest pre-release version"
53+ exit 1
54+ fi
55+ echo "Using pre-release version: ${VERSION}"
56+elif [ "$VERSION" = "latest" ]; then
57+ echo "Using latest stable release"
58+ RELEASE_DATA=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" 2>/dev/null || echo "")
59+ if [ -z "$RELEASE_DATA" ]; then
60+ echo "Error: Failed to fetch latest release information from GitHub API"
61+ exit 1
62+ fi
63+ VERSION=$(echo "$RELEASE_DATA" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name":\s*"([^"]+)".*/\1/')
64+ if [ -z "$VERSION" ]; then
65+ echo "Error: Could not determine latest stable version"
66+ exit 1
67+ fi
68+ echo "Resolved version: ${VERSION}"
69+else
70+ echo "Using version: ${VERSION}"
71+fi
72+
73+DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}/${TARBALL}"
4074
4175 # Create temporary directory
4276 TMP_DIR=$(mktemp -d)
4377 trap 'rm -rf "$TMP_DIR"' EXIT
4478
4579 # Download checksums file
46-CHECKSUMS_URL="https://github.com/${REPO}/releases/latest/download/checksums.txt"
80+CHECKSUMS_URL="https://github.com/${REPO}/releases/download/${VERSION}/checksums.txt"
4781 echo "Downloading checksums..."
4882 if ! curl -fsSL "$CHECKSUMS_URL" -o "$TMP_DIR/checksums.txt"; then
4983 echo "Error: Failed to download checksums file"
@@ -3,8 +3,10 @@ set -e
3 3
4 # Dumber installer script4 # Dumber installer script
5 # Usage: curl -fsSL https://dumber.bnema.dev/install | sh5 # Usage: curl -fsSL https://dumber.bnema.dev/install | sh
6+# Usage with pre-release: curl -fsSL https://dumber.bnema.dev/install | DUMBER_PRERELEASE=1 sh
6 7
7 REPO="bnema/dumber"8 REPO="bnema/dumber"
9+VERSION="${DUMBER_VERSION:-latest}"
8 10
9 # Prefer ~/.local/bin if it exists and is in PATH, otherwise /usr/local/bin11 # Prefer ~/.local/bin if it exists and is in PATH, otherwise /usr/local/bin
10 if [ -d "$HOME/.local/bin" ]; then12 if [ -d "$HOME/.local/bin" ]; then
@@ -36,14 +38,46 @@ fi
36 echo "Detected: linux/x86_64"38 echo "Detected: linux/x86_64"
37 39
38 TARBALL="dumber_linux_x86_64.tar.gz"40 TARBALL="dumber_linux_x86_64.tar.gz"
39-DOWNLOAD_URL="https://github.com/${REPO}/releases/latest/download/${TARBALL}"41+
42+# Determine version to download
43+if [ "$VERSION" = "latest" ] && [ -n "$DUMBER_PRERELEASE" ]; then
44+ echo "Finding latest pre-release..."
45+ RELEASE_DATA=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases?per_page=1" 2>/dev/null || echo "")
46+ if [ -z "$RELEASE_DATA" ]; then
47+ echo "Error: Failed to fetch release information from GitHub API"
48+ exit 1
49+ fi
50+ VERSION=$(echo "$RELEASE_DATA" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name":\s*"([^"]+)".*/\1/')
51+ if [ -z "$VERSION" ]; then
52+ echo "Error: Could not determine latest pre-release version"
53+ exit 1
54+ fi
55+ echo "Using pre-release version: ${VERSION}"
56+elif [ "$VERSION" = "latest" ]; then
57+ echo "Using latest stable release"
58+ RELEASE_DATA=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" 2>/dev/null || echo "")
59+ if [ -z "$RELEASE_DATA" ]; then
60+ echo "Error: Failed to fetch latest release information from GitHub API"
61+ exit 1
62+ fi
63+ VERSION=$(echo "$RELEASE_DATA" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name":\s*"([^"]+)".*/\1/')
64+ if [ -z "$VERSION" ]; then
65+ echo "Error: Could not determine latest stable version"
66+ exit 1
67+ fi
68+ echo "Resolved version: ${VERSION}"
69+else
70+ echo "Using version: ${VERSION}"
71+fi
72+
73+DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}/${TARBALL}"
40 74
41 # Create temporary directory75 # Create temporary directory
42 TMP_DIR=$(mktemp -d)76 TMP_DIR=$(mktemp -d)
43 trap 'rm -rf "$TMP_DIR"' EXIT77 trap 'rm -rf "$TMP_DIR"' EXIT
44 78
45 # Download checksums file79 # Download checksums file
46-CHECKSUMS_URL="https://github.com/${REPO}/releases/latest/download/checksums.txt"80+CHECKSUMS_URL="https://github.com/${REPO}/releases/download/${VERSION}/checksums.txt"
47 echo "Downloading checksums..."81 echo "Downloading checksums..."
48 if ! curl -fsSL "$CHECKSUMS_URL" -o "$TMP_DIR/checksums.txt"; then82 if ! curl -fsSL "$CHECKSUMS_URL" -o "$TMP_DIR/checksums.txt"; then
49 echo "Error: Failed to download checksums file"83 echo "Error: Failed to download checksums file"

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 8

Tags 42

↑↓ moveenter openesc close