From fed8ba164b868241a4b48a6b87b822142542d0e1 Mon Sep 17 00:00:00 2001 From: Michael Ramos Date: Tue, 27 Oct 2026 15:18:26 -0400 Subject: [PATCH] fix: fetch the static musl plannotator-tui build on alpine and other musl linux --- scripts/fetch-plannotator-tui.sh | 5 ++++- scripts/test-fetch-plannotator-tui.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/fetch-plannotator-tui.sh b/scripts/fetch-plannotator-tui.sh index bc4e90d..4615467 100755 --- a/scripts/fetch-plannotator-tui.sh +++ b/scripts/fetch-plannotator-tui.sh @@ -44,7 +44,10 @@ fi case "$(uname -s)/$(uname -m)" in Darwin/arm64) target=aarch64-apple-darwin ;; Darwin/x86_64) target=x86_64-apple-darwin ;; - Linux/x86_64) target=x86_64-unknown-linux-gnu ;; + Linux/x86_64) + # Alpine and other musl systems can't run the glibc build; the static musl build runs there. + if [ -e /lib/ld-musl-x86_64.so.1 ]; then target=x86_64-unknown-linux-musl + else target=x86_64-unknown-linux-gnu; fi ;; Linux/aarch64|Linux/arm64) target=aarch64-unknown-linux-gnu ;; *) echo "warning: no plannotator-tui build for $(uname -s)/$(uname -m); the review pane is unavailable" >&2; exit 0 ;; esac diff --git a/scripts/test-fetch-plannotator-tui.sh b/scripts/test-fetch-plannotator-tui.sh index c804ce2..2cedd34 100644 --- a/scripts/test-fetch-plannotator-tui.sh +++ b/scripts/test-fetch-plannotator-tui.sh @@ -58,7 +58,7 @@ curl_log="$test_root/curl.log" sha256() { if command -v sha256sum >/dev/null 2>&1; then sha256sum "$1"; else shasum -a 256 "$1"; fi | awk '{print $1}'; } publish() { : > "$release_root/SHA256SUMS" - for target in aarch64-apple-darwin x86_64-apple-darwin x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu; do + for target in aarch64-apple-darwin x86_64-apple-darwin x86_64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-gnu; do cp "$1" "$release_root/plannotator-tui-$target" printf '%s %s\n' "$(sha256 "$1")" "plannotator-tui-$target" >> "$release_root/SHA256SUMS" done