发布 0.2.2:全部分发产物带签名,修发布脚本读 manifest 的编码
mygo.json version -> 0.2.2;CHANGELOG 加 0.2.2 小节。publish-gitea.ps1 读 update-windows-amd64.json 时补 -Encoding UTF8(PS 5.1 默认 ANSI 解码,中文 notes 乱码导致 ConvertFrom-Json 直接失败)。AGENTS.md 补该坑。产物:setup/tar.gz/portable.zip 全部签名 Valid;端到端 0.2.1->0.2.2 走 24KB delta。
This commit is contained in:
1 parent
37827eb8c7
commit
2bd2b6d1af
4 files changed
+14
-3
No files matched your search
@@ -233,7 +233,9 @@ Windows 轻量自动化工具箱:**单个 mygo 进程**(托盘常驻 + 原
|
||||
+ `-f`(双引号里 ```$` 会把 `$` 转义,正文会留下字面 `$(...)`);
|
||||
- `build.bat` 读 `mygo.json` 的版本号必须 `Get-Content -Raw -Encoding UTF8`:不加会按 GBK 读中文,
|
||||
`ConvertFrom-Json` 报 `Invalid object passed in, ':' or '}' expected`,版本号取空 → 便携版 zip
|
||||
被命名成 `0.0.0`。zip 名对不上发布脚本的过滤器就传不上去;
|
||||
被命名成 `0.0.0`。zip 名对不上发布脚本的过滤器就传不上去;同理 `publish-gitea.ps1` 读
|
||||
`update-<target>.json` 必须 `Get-Content -Raw -Encoding UTF8`:不加时 manifest 里的中文 notes
|
||||
被按 GBK 解码,`ConvertFrom-Json` 报「传入的对象无效,应为“:”或“}”」,发布第一步就中断(0.2.2 踩到);
|
||||
- Gitea 的 `allowed_types` 白名单只影响 issue 之类附件,**Release 附件实测接受 `.exe` 与 `.delta`**
|
||||
(setup 安装包、增量包都直接上传成功),不需要再套一层 zip;脚本里保留「delta 失败只警告」的容错;
|
||||
- 自签名证书**不能用 mygo 的 `windows.certificate` 路径**:它固定给 signtool 传
|
||||
|
||||
@@ -4,6 +4,15 @@ mygo 构建会用 `## <version>` 段落作为更新窗口里的发布说明:
|
||||
`mygo.json` 的 `version` 改掉,再在下面加一段同名小节,否则 `mygo build` 会报
|
||||
“CHANGELOG.md has no notes for <version>”。
|
||||
|
||||
## 0.2.2 - 2026-11-16
|
||||
|
||||
代码签名版本:所有分发产物都带 Authenticode 签名,导入过根证书的机器不再提示「无法验证发布者」。
|
||||
|
||||
- 主程序、watchdog、安装包与卸载器统一签名(`mygo.json` 的 `windows.signCommand`)
|
||||
- 新增 `scripts/codesign/`:生成自签名证书、签名单个文件、导入信任三个脚本
|
||||
- 公钥证书 `certs/ZeroOrigin-CodeSign.cer`,新机器跑 `trust.ps1` 后生效
|
||||
- 程序行为与 0.2.1 一致
|
||||
|
||||
## 0.2.1 - 2026-11-16
|
||||
|
||||
更新链路验证版本:程序行为与 0.2.0 一致,主要用来验证「检查更新 → 下载 → 就地替换 → 重启」。
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "ZerOriginTool",
|
||||
"slug": "zerorigin-toolbox",
|
||||
"identifier": "cn.zerorigin.toolbox",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"copyright": "© 2026 零源",
|
||||
"publisher": "零源",
|
||||
"main": "./cmd/zerorigin",
|
||||
|
||||
@@ -59,7 +59,7 @@ if (-not (Test-Path -LiteralPath $Dir)) { throw "找不到构建输出目录:$
|
||||
# manifest 是唯一必须存在的产物:没有它就没有更新可发。
|
||||
$manifest = Get-ChildItem -LiteralPath $Dir -Filter "update-*-*.json" | Select-Object -First 1
|
||||
if (-not $manifest) { throw "$Dir 里没有 update-<target>.json:构建时没带签名私钥?" }
|
||||
$m = Get-Content -LiteralPath $manifest.FullName -Raw | ConvertFrom-Json
|
||||
$m = Get-Content -LiteralPath $manifest.FullName -Raw -Encoding UTF8 | ConvertFrom-Json
|
||||
$version = $m.version
|
||||
if (-not $version) { throw "$($manifest.Name) 里没有 version 字段" }
|
||||
$archiveName = Split-Path -Leaf ([uri]$m.url).AbsolutePath
|
||||
|
||||
Reference in new issue
Block a user