This commit is contained in:
MickLesk
2026-07-03 09:33:13 +02:00
parent 43c2766181
commit a48679d0c8
2 changed files with 46 additions and 8 deletions
+25 -1
View File
@@ -168,7 +168,15 @@ EOF
setup_uv
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "${RELEASE}" "$SRC_DIR"
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1] | split("+")[0]' ${SRC_DIR}/package.json)"
NODE_VERSION="24" NODE_MODULE="corepack,pnpm@${PNPM_VERSION}" setup_nodejs
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
# corepack activates pnpm but its global bin dir is not in PATH by default;
# export it so that `pnpm config set --global` succeeds.
export PNPM_HOME="/root/.local/share/pnpm"
export PATH="$PNPM_HOME/bin:$PATH"
mkdir -p "$PNPM_HOME/bin"
$STD pnpm config set --global dangerouslyAllowAllBuilds true
msg_info "Updating Immich web and microservices"
cd "$SRC_DIR"/server
@@ -210,6 +218,22 @@ EOF
export MISE_TRUSTED_CONFIG_PATHS="$SRC_DIR"/mise.toml
export MISE_DISABLE_TOOLS=github:jellyfin/jellyfin-ffmpeg
$STD mise install
# extism-js (the JS PDK compiler used by plugin-core's `build:wasm`) is provided by the
# `github:extism/js-pdk` mise tool, but mise's github backend does not reliably expose it on
# PATH for nested pnpm build scripts. The `@extism/js-pdk` npm package is only type defs and
# ships no binary. Guarantee availability by fetching the pinned release binary directly if it
# is not already resolvable.
export PATH="$(mise bin-paths 2>/dev/null | tr '\n' ':')$PATH"
if ! command -v extism-js >/dev/null 2>&1; then
# extism-js is published as a bare gzip-compressed single binary (.gz), which
# fetch_and_deploy_gh_release cannot deploy (singlefile leaves it compressed,
# prebuild only handles zip/tar). Fetch + gunzip it directly.
EXTISM_ARCH="$(arch_resolve x86_64 aarch64)"
curl_download /tmp/extism-js.gz "https://github.com/extism/js-pdk/releases/download/v1.6.0/extism-js-${EXTISM_ARCH}-linux-v1.6.0.gz"
gunzip -f /tmp/extism-js.gz
install -m 0755 /tmp/extism-js /usr/local/bin/extism-js
rm -f /tmp/extism-js
fi
$STD mise exec -- pnpm --filter @immich/sdk --filter @immich/plugin-sdk --filter @immich/plugin-core install --frozen-lockfile
$STD mise exec -- pnpm --filter @immich/sdk --filter @immich/plugin-sdk --filter @immich/plugin-core build
mkdir -p "$PLUGIN_DIR"