chore: disable differential updates

This commit is contained in:
ILoveBingLu
2026-04-04 04:25:31 +08:00
parent 9d79b00d77
commit e403e9c4f1
5 changed files with 12 additions and 35 deletions

View File

@@ -125,7 +125,6 @@ jobs:
run: |
$version = "${{ needs.prepare-meta.outputs.version }}"
$installer = "release/CipherTalk-$version-Setup.exe"
$blockmap = "release/CipherTalk-$version-Setup.exe.blockmap"
if (-not (Test-Path $installer)) {
Write-Error "Installer not found: $installer"
exit 1
@@ -139,10 +138,6 @@ jobs:
Write-Error "latest.yml should contain exactly one size entry, found $($sizeLines.Count)"
exit 1
}
if (-not (Test-Path $blockmap)) {
Write-Error "blockmap not found: $blockmap"
exit 1
}
$latestYml = Get-Content "release/latest.yml" -Raw
$shaMatch = [regex]::Match($latestYml, '(?m)^sha512:\s*(.+)$')
@@ -171,7 +166,6 @@ jobs:
path: |
release/CipherTalk-${{ needs.prepare-meta.outputs.version }}-Setup.exe
release/latest.yml
release/CipherTalk-${{ needs.prepare-meta.outputs.version }}-Setup.exe.blockmap
if-no-files-found: error
generate-release-body:
@@ -258,7 +252,6 @@ jobs:
run: |
$version = "${{ needs.prepare-meta.outputs.version }}"
$installer = "release/CipherTalk-$version-Setup.exe"
$blockmap = "release/CipherTalk-$version-Setup.exe.blockmap"
if (-not (Test-Path $installer)) {
Write-Error "Installer not found: $installer"
exit 1
@@ -280,10 +273,6 @@ jobs:
Write-Error "release-body.md not found"
exit 1
}
if (-not (Test-Path $blockmap)) {
Write-Error "blockmap not found: $blockmap"
exit 1
}
$latestYml = Get-Content "release/latest.yml" -Raw
$shaMatch = [regex]::Match($latestYml, '(?m)^sha512:\s*(.+)$')
@@ -317,7 +306,6 @@ jobs:
release/CipherTalk-${{ needs.prepare-meta.outputs.version }}-Setup.exe
release/latest.yml
release/force-update.json
release/CipherTalk-${{ needs.prepare-meta.outputs.version }}-Setup.exe.blockmap
mirror-r2:
runs-on: windows-latest
@@ -366,13 +354,6 @@ jobs:
$bucket = "s3://$($env:R2_BUCKET_NAME)"
$version = "${{ needs.prepare-meta.outputs.version }}"
$currentInstaller = "CipherTalk-$version-Setup.exe"
$currentBlockmap = "CipherTalk-$version-Setup.exe.blockmap"
$currentBlockmapPath = "release/$currentBlockmap"
if (-not (Test-Path $currentBlockmapPath)) {
Write-Error "blockmap not found: $currentBlockmapPath"
exit 1
}
$existingInstallers = aws s3 ls $bucket --endpoint-url $endpoint | ForEach-Object {
$line = $_.ToString().Trim()
@@ -395,15 +376,12 @@ jobs:
}
foreach ($blockmap in $existingBlockmaps) {
if ($blockmap -ne $currentBlockmap) {
aws s3 rm "$bucket/$blockmap" --endpoint-url $endpoint
}
aws s3 rm "$bucket/$blockmap" --endpoint-url $endpoint
}
aws s3 cp "release/$currentInstaller" "$bucket/$currentInstaller" --endpoint-url $endpoint
aws s3 cp "release/latest.yml" "$bucket/latest.yml" --endpoint-url $endpoint
aws s3 cp "release/force-update.json" "$bucket/force-update.json" --endpoint-url $endpoint
aws s3 cp $currentBlockmapPath "$bucket/$currentBlockmap" --endpoint-url $endpoint
notify-telegram-success:
runs-on: windows-latest

View File

@@ -7,6 +7,10 @@
## [未发布]
### 变更
- 禁用 Windows 差分更新,统一改为全量安装包更新
- 简化发布链路,移除 `.blockmap` 产物依赖与校验
## [3.0.1] - 2026-04-04
### 修复

View File

@@ -62,7 +62,7 @@ protocol.registerSchemesAsPrivileged([
// 配置自动更新
autoUpdater.autoDownload = false
autoUpdater.autoInstallOnAppQuit = true
autoUpdater.disableDifferentialDownload = false // 用差分更新,失败时由 electron-updater 回退完整
autoUpdater.disableDifferentialDownload = true // 用差分更新,统一使用全量安装
// 单例服务
let dbService: DatabaseService | null = null

View File

@@ -101,7 +101,7 @@
"requestedExecutionLevel": "asInvoker"
},
"nsis": {
"differentialPackage": true,
"differentialPackage": false,
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,

View File

@@ -58,7 +58,7 @@ GH_TOKEN=ghp_xxxx
其中:
1. `prepare-meta` 生成 `force-update.json``release-context.json`
2. `build-windows` 负责构建安装包`latest.yml``*.blockmap`
2. `build-windows` 负责构建安装包`latest.yml`
3. `generate-release-body` 负责 AI / 模板版发布说明
4. `publish-github-release` 汇总产物并创建 GitHub Release
5. `mirror-r2``notify-telegram-success` 在发布成功后并行执行
@@ -68,14 +68,12 @@ GitHub Release 上传内容:
- 安装包
- `latest.yml`
- `force-update.json`
- `*.blockmap`(必需)
Cloudflare R2 同步内容:
- 安装包
- `latest.yml`
- `force-update.json`
- `*.blockmap`
Telegram 通知:
@@ -86,27 +84,24 @@ GitHub Release 资产包括:
- 安装包
- `latest.yml`
- `force-update.json`
- `*.blockmap`
10. 向 Telegram 频道/群发送发布通知AI 摘要 + 强制更新提醒)
## Windows 差分更新
## Windows 全量更新
当前 Windows 自动更新已启用差分下载。
当前 Windows 自动更新统一使用全量安装包下载。
依赖产物为:
- `CipherTalk-x.y.z-Setup.exe`
- `latest.yml`
- 至少一个 `*.blockmap`
工作流会在构建、GitHub Release 发布、R2 镜像同步阶段校验 `*.blockmap` 是否存在;缺失时直接失败,避免退回全量更新而未被发现
工作流会在构建与发布阶段校验安装包和 `latest.yml` 的哈希是否一致,避免元数据与真实安装包不匹配
说明:
- 当前仍是未签名发布
- 未签名状态下差分更新可以工作
- 公开分发时稳定性仍可能受 SmartScreen / 杀软 / 系统策略影响
- 若差分下载失败,`electron-updater` 应回退到完整包更新,不修改现有 UI 交互
- 当前已禁用差分更新,客户端始终下载完整安装包
## 版本要求