From 8d2f65ab8dda01ff88219dadfa0720dc2fee1491 Mon Sep 17 00:00:00 2001 From: LIm1tZz7 <36764786+TheBadRoger@users.noreply.github.com> Date: Mon, 5 Oct 2026 22:53:11 +0800 Subject: [PATCH] Package only the platform storage shared library --- scripts/package.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/package.sh b/scripts/package.sh index 83c5829..57a63e9 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -188,8 +188,13 @@ Step "Packing $name" rm -rf "$out_dir/.stage" mkdir -p "$stage/bin" "$stage/resources" -cp "$repo_root/chusql-core/storage/target/release/"libchusql_core_storage.* "$stage/bin/" \ - || Fail "chusql-core/storage/target/release/libchusql_core_storage.* is not built (run without --no-build)" +case "$platform" in + linux-*) storage_name=libchusql_core_storage.so ;; + macos-*) storage_name=libchusql_core_storage.dylib ;; + *) Fail "unsupported Unix platform: $platform" ;; +esac +cp "$repo_root/chusql-core/storage/target/release/$storage_name" "$stage/bin/" \ + || Fail "$storage_name is not built (run without --no-build)" stack_root=$(cd "$repo_root/chusql-cli" && stack path --local-install-root | tail -n 1 | tr -d '\r') for front_name in chusql-web chusql-server csql; do