Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

release: retry the browser bundle's network steps

RoversXb56c585f6577
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 42c43967..0e9df3d0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -202,15 +202,20 @@ jobs:
# from Cargo.toml rather than written here twice. The prebuilt binary
# takes seconds where `cargo install` takes minutes. binaryen is
# wasm-opt, which takes a quarter off the wasm.
+ #
+ # Retried, because this job gates all three packaging jobs: a GitHub
+ # release 502 or an apt mirror hiccup would otherwise take the whole
+ # release with it.
- name: Install wasm-bindgen and wasm-opt
run: |
set -euo pipefail
version=$(grep -E '^wasm-bindgen = "=' Cargo.toml | sed -E 's/.*"=([0-9.]+)".*/\1/')
dir="wasm-bindgen-${version}-x86_64-unknown-linux-musl"
- curl -sSfL "https://github.com/rustwasm/wasm-bindgen/releases/download/${version}/${dir}.tar.gz" \
- | tar -xz -C "$HOME/.cargo/bin" --strip-components=1 "${dir}/wasm-bindgen"
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends binaryen
+ bash ci/retry.sh bash -c "curl -sSfL \
+ 'https://github.com/rustwasm/wasm-bindgen/releases/download/${version}/${dir}.tar.gz' \
+ | tar -xz -C \"\$HOME/.cargo/bin\" --strip-components=1 '${dir}/wasm-bindgen'"
+ bash ci/retry.sh sudo apt-get update
+ bash ci/retry.sh sudo apt-get install -y --no-install-recommends binaryen
wasm-bindgen --version
wasm-opt --version
diff --git a/ci/build-web.sh b/ci/build-web.sh
index e6aa8985..2468764b 100755
--- a/ci/build-web.sh
+++ b/ci/build-web.sh
@@ -41,8 +41,13 @@ cp assets/fonts/JetBrainsMono-Regular.ttf assets/fonts/SymbolsNerdFontMono-Regul
# an earlier build are cleared here. npm ci installs exactly the lockfile.
rm -rf "$OUT/assets" "$OUT/index.html" "$OUT/index.html.gz"
UI=thinkterm-web/ui
+# The one step here that reaches the network, and the one worth retrying:
+# a registry hiccup would otherwise fail a release build whose packaging
+# jobs all wait on this bundle. The rest of this script is local work, so
+# retrying the script as a whole would only multiply the cost of a genuine
+# failure.
if [ ! -d "$UI/node_modules" ] || [ "$UI/package-lock.json" -nt "$UI/node_modules/.package-lock.json" ]; then
- npm ci --prefix "$UI" --no-audit --no-fund
+ bash ci/retry.sh npm ci --prefix "$UI" --no-audit --no-fund
fi
npm run --prefix "$UI" --silent build
# Precompress what a browser will take compressed. The mux server sends a