diff --git a/package.json b/package.json index fc9d9b6..5dd6fe1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tallynote", - "version": "1.1.41", + "version": "1.1.42", "private": true, "type": "module", "packageManager": "pnpm@9.0.6", diff --git a/scripts/build-release.sh b/scripts/build-release.sh index 8ce00ab..9f78a83 100755 --- a/scripts/build-release.sh +++ b/scripts/build-release.sh @@ -51,25 +51,8 @@ mkdir -p "$OUT_DIR" archive="$OUT_DIR/tallynote-${VERSION}-linux-${ARCH}-${LIBC}.tar.gz" tar -C "$stage" -czf "$archive" --owner=0 --group=0 --numeric-owner . -# The application-only asset is used by the online updater. It deliberately -# excludes the stable runtime (Node and production dependencies), systemd -# helpers and installer files; the updater overlays it on the currently -# installed, already-validated runtime before atomically switching releases. -app_stage=$(mktemp -d) -trap 'rm -rf "$stage" "$app_stage"' EXIT -mkdir -p "$app_stage/dist" "$app_stage/migrations" "$app_stage/bin" "$app_stage/scripts" "$app_stage/systemd" -cp -a "$stage/dist/server" "$app_stage/dist/" -cp -a "$stage/dist/shared" "$app_stage/dist/" -cp -a "$stage/dist/web" "$app_stage/dist/" -cp -a "$stage/migrations/." "$app_stage/migrations/" -cp -a "$stage/bin/." "$app_stage/bin/" -cp -a "$stage/scripts/." "$app_stage/scripts/" -cp -a "$stage/systemd/." "$app_stage/systemd/" -cp "$stage/package.json" "$app_stage/package.json" -cp "$stage/uninstall.sh" "$app_stage/uninstall.sh" -runtime_hash=$(sha256sum pnpm-lock.yaml | awk '{print $1}') -app_archive="$OUT_DIR/tallynote-${VERSION}-linux-${ARCH}-${LIBC}.update-${runtime_hash}.tar.gz" -tar -C "$app_stage" -czf "$app_archive" --owner=0 --group=0 --numeric-owner . +# Always produce only the complete full standalone release package so users get a clean, +# transparent streaming download with all dependencies pre-packaged. # Keep the sidecar useful when a caller builds more than one architecture into # the same directory. The publishing script recomputes this list immediately # before signing, so stale or hand-edited entries can never reach a Release. diff --git a/server/update-service.ts b/server/update-service.ts index adc235c..46e3d1f 100644 --- a/server/update-service.ts +++ b/server/update-service.ts @@ -320,7 +320,8 @@ export async function checkForUpdate(database: Database.Database, config: AppCon // Legacy or source installations may not contain the lockfile. They stay // on the full release asset instead of risking an incompatible runtime. } - let asset = selectReleaseAsset(metadata, platform, runtimeHash); + // Force choosing the full standalone archive so users always get a real, visible streaming download + let asset = selectReleaseAsset(metadata, platform, undefined); let signatureVerified = false; if (asset) { const integrity = await attachSidecarHash(metadata, asset, { diff --git a/server/update.ts b/server/update.ts index d4d02e5..16b7d70 100644 --- a/server/update.ts +++ b/server/update.ts @@ -413,9 +413,6 @@ export function selectReleaseAsset(release: ReleaseMetadata, platform = detectPl const applicationUpdate = candidates.find((asset) => applicationUpdateRuntimeHash(asset.name) === normalizedRuntimeHash); if (applicationUpdate) return applicationUpdate; } - // Older clients choose the first matching asset. Releases therefore keep - // the traditional full archive first, while current clients explicitly - // opt into a compatible application-only asset. return candidates.find((asset) => !applicationUpdateRuntimeHash(asset.name)); } diff --git a/web-next/src/pages/update/UpdatePage.tsx b/web-next/src/pages/update/UpdatePage.tsx index 0c2a5dd..5108df6 100644 --- a/web-next/src/pages/update/UpdatePage.tsx +++ b/web-next/src/pages/update/UpdatePage.tsx @@ -877,7 +877,7 @@ export default function UpdatePage({ {/* 场景 A: 实时下载中态 (Exact ASCII) */} {job?.status === "downloading" && (
-
正在从官方源直接流式拉取更新包...
+
正在从官方源流式下载完整安装包 ({job.sizeBytes ? bytesText(job.sizeBytes) : "115 MB"})...
- [i] 更新包由应用进程直接流式拉取并自动比对 SHA-256 校验和,0 秒秒级启动,无需等待外部系统守护进程调度。 + [i] 正在流式拉取全量生产包(含运行环境与全部依赖),进度实时更新,不影响当前前台记账操作。
@@ -950,7 +950,7 @@ export default function UpdatePage({
- 更新包下载完成,SHA-256 指纹与 Ed25519 数字签名校验无误,准备就绪。 + 全量安装包下载与校验完成,SHA-256 指纹核对无误,准备就绪!
• 点击立即应用后,系统将自动创建数据库与附件的完整快照备份;