From 542e3ae7ff158419af9c775010b9cb19351ceb5a Mon Sep 17 00:00:00 2001 From: Peefy Date: Tue, 20 Oct 2026 13:47:17 +0800 Subject: [PATCH] fix(release): stage the iOS static archives at their real paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build_ios() took the same "dir:file" destination stage() does but used it whole as the install path, so the archive landed in a file literally named `ios-arm64:libkcl.a` sitting beside the go/lib/ios-arm64/ directory. Nothing downstream reads that name: the job's own `lipo -info go/lib/ios-arm64/ libkcl.a` check failed with "No such file or directory" and aborted before the vendoring commit, which is how the first release to run this path — the v0.13.2 branch — could not be vendored at all. Splitting dest the way stage() does makes the two functions agree on what a destination is. build-libkcl-mobile.yaml stages the same two archives inline with explicit paths, so it was never affected; only the vendor-libs path goes through here. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Peefy --- hack/download-libs.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hack/download-libs.sh b/hack/download-libs.sh index 84120db7..05ca5f9b 100755 --- a/hack/download-libs.sh +++ b/hack/download-libs.sh @@ -181,9 +181,13 @@ build_ios() { echo "==> ${rust_target}: cargo build --target ${rust_target}" >&2 rustup target add "$rust_target" >/dev/null cargo build --release --target "$rust_target" --manifest-path c/Cargo.toml - mkdir -p "${dest%%:*}" - install -m 0644 "c/target/${rust_target}/release/libkcl_lib_c.a" "$dest" - echo " staged ${dest} ($(du -h "$dest" | cut -f1))" >&2 + # Split the "dir:file" dest the way stage() does. Using it whole writes the + # archive to a file literally named `ios-arm64:libkcl.a` sitting beside the + # directory, which no later step looks at. + local dir="${dest%%:*}" name="${dest##*:}" + mkdir -p "$dir" + install -m 0644 "c/target/${rust_target}/release/libkcl_lib_c.a" "${dir}/${name}" + echo " staged ${dir}/${name} ($(du -h "${dir}/${name}" | cut -f1))" >&2 } # Guarded rather than iterated bare: an empty array under `set -u` is an