Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

chore: make desktop release install opt-in

tianma-if3de4fc211531
diff --git a/AGENTS.md b/AGENTS.md
index 487e3203..be3ae0d5 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -19,7 +19,7 @@
6. **原生资产构建与复用**:由 `scripts/plan-native-release.mjs` 决定重建或复用;桌面资产包含 `apps/web`。修改判定规则时同步更新测试。移动端重建使用 `bun run build:android:apk:local`,签名配置保存在仓库外。
7. **Draft 内准备资产**:通过带 `release_tag` 的 `workflow_dispatch` 在 Draft 中准备并验证资产;`published` 事件只审计,禁止重新构建或上传。
8. **桌面验证职责**:桌面 Release 工作流负责测试、包结构检查、签名与公证;代理不再重复下载 Draft 或执行本地首次启动验收,除非用户明确要求。
-9. **发布后安装**:正式发布后,从该 GitHub Release 下载与当前 Mac 架构匹配的最终 DMG,覆盖安装 `/Applications/EdgeEver.app` 并启动,保留用户数据。功能体验由用户在实际使用中验证。
+9. **发布后更新**:正式发布后,发布流程默认不得下载、覆盖安装或启动 `/Applications/EdgeEver.app`;已安装的桌面端通过应用内自动更新机制获取新版。仅在用户明确要求时使用 `--install-desktop` 执行原有安装验收,功能体验由用户在实际使用中验证。
10. **失败处理**:工作流或资产审计失败时保持或恢复 Draft,修复后重跑;不得公开已知损坏的 Release。
11. **Release 说明结构**:使用中英文双语格式(正文禁止包含字面量 `\n`),只写用户可感知的变化、影响以及必要的升级或迁移提醒。类型检查、构建命令、签名、公证、资产复用等技术验证细节保留在 Actions 和关联 Issue 中,不写入公开 Release 正文。功能/修复关联对应 Issue 并标记 Label,发布后回链并关闭 Issue。正文结构:
diff --git a/docs/release.md b/docs/release.md
index 0c959ff8..3d86c791 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -33,8 +33,10 @@ stored in the tracking Issue, not in the public Release notes. Public notes
contain only user-visible changes, impact, and necessary migration guidance.
Use `--dry-run` to inspect commit coverage, the native rebuild plan, and notes.
-Use `--skip-install` only when the published macOS application should not be
-installed and launched after the Release.
+After publication, the command does not download, install, or launch the macOS
+application. Existing desktop installations receive new versions through the
+in-app automatic updater. Pass `--install-desktop` explicitly only when the
+previous installation check is actually needed.
## EdgeEver-Specific Behavior
@@ -52,8 +54,9 @@ installed and launched after the Release.
API-only Release from prompting an unnecessary native update.
- The script creates the tracking Issue and Draft Release, validates or reuses
native assets, prepares the multi-platform Docker image in both GHCR and the
- public Tencent TCR mirror, publishes, closes the Issue, and installs the
- matching DMG.
+ public Tencent TCR mirror, publishes, and closes the Issue without installing
+ the desktop application by default; installation remains available as an
+ explicit option.
Demo deployment continues independently after its Actions URL is printed.
- Mobile store delivery is not part of this command. See
[Mobile Store Delivery](store-delivery.md).
@@ -74,5 +77,5 @@ the Release can be published.
run instead of creating another Issue, commit, or Release.
- A failed post-publication native or Docker audit attempts to return the Release to
Draft and leaves the Issue open.
-- If application replacement fails, the script restores the previous app from
- its macOS Trash backup when possible.
+- If an explicit application installation fails, the script restores the previous
+ app from its macOS Trash backup when possible.
diff --git a/docs/release.zh-CN.md b/docs/release.zh-CN.md
index e7eb4402..9f513ca3 100644
--- a/docs/release.zh-CN.md
+++ b/docs/release.zh-CN.md
@@ -31,8 +31,9 @@ bun run release -- \
覆盖审计在修改本地或 GitHub 状态之前执行。映射记录在跟踪 Issue 中,不写入
公开 Release 说明。公开说明只包含用户可感知的变化、影响和必要的迁移提醒。
-使用 `--dry-run` 查看提交覆盖、原生端重建计划和说明。仅在发布后不应安装并
-启动 macOS 应用时使用 `--skip-install`。
+使用 `--dry-run` 查看提交覆盖、原生端重建计划和说明。发布完成后不会下载、
+安装或启动 macOS 应用;已安装的桌面端通过应用内自动更新机制获取新版。仅在
+确实需要原有安装验收时显式传入 `--install-desktop`。
## EdgeEver 特有规则
@@ -46,7 +47,7 @@ bun run release -- \
GitHub Tag,避免仅涉及 Web 或 API 的 Release 触发无效原生更新。
- 脚本负责创建跟踪 Issue 和 Draft Release、验证或复用原生资产、准备多架构
Docker 镜像并同时写入 GHCR 与腾讯云 TCR 公共镜像、正式发布、关闭 Issue,
- 并安装与当前 Mac 架构匹配的 DMG。
+ 默认不安装桌面端应用;安装能力作为显式选项保留。
输出 Actions 链接后,Demo 部署会独立继续执行。
- 此命令不执行移动端商店交付,详见
[移动端商店交付](store-delivery.zh-CN.md)。
@@ -65,4 +66,4 @@ Actions Secret。对于 TCR 个人版,用户名是腾讯云账号 ID,密码
Release。
- 发布后的原生资产或 Docker 镜像审计失败时,脚本会尝试将 Release 恢复为
Draft,并保留 Issue。
-- 替换应用失败时,脚本会尽可能从 macOS 废纸篓备份恢复上一版应用。
+- 显式安装时若替换应用失败,脚本会尽可能从 macOS 废纸篓备份恢复上一版应用。
diff --git a/scripts/release.mjs b/scripts/release.mjs
index bbcc2f66..5d1c2cb4 100644
--- a/scripts/release.mjs
+++ b/scripts/release.mjs
@@ -12,7 +12,7 @@ import {
writeFileSync,
} from "node:fs";
import { tmpdir } from "node:os";
-import { basename, join, resolve, sep } from "node:path";
+import { join, resolve, sep } from "node:path";
import { spawn, spawnSync } from "node:child_process";
import { nativeReleaseAssetsReady } from "./check-native-release-assets.mjs";
import { planNativeRelease } from "./plan-native-release.mjs";
@@ -74,7 +74,7 @@ Options:
--change-locale <tag:text> Optional localized bullet; repeat once per change and locale
--change-commit <sha,...> Commits covered by the corresponding bilingual bullet
--ignore-commit <sha:why> Explicitly exclude a non-user-facing commit; may be repeated
- --skip-install Do not install the final DMG after publication
+ --install-desktop Install and launch the final DMG after publication
--dry-run Print the plan and generated notes without mutations
--help Show this help
`;
@@ -90,7 +90,7 @@ export const parseReleaseArgs = (argv) => {
localizedChanges: [],
changeCommits: [],
ignoredCommits: [],
- skipInstall: false,
+ installDesktop: false,
dryRun: false,
help: false,
};
@@ -109,8 +109,8 @@ export const parseReleaseArgs = (argv) => {
for (let index = 0; index < argv.length; index += 1) {
const argument = argv[index];
- if (argument === "--skip-install") {
- options.skipInstall = true;
+ if (argument === "--install-desktop") {
+ options.installDesktop = true;
continue;
}
if (argument === "--dry-run") {
@@ -757,7 +757,7 @@ const sha256File = (path) => new Promise((resolveHash, rejectHash) => {
export const installPublishedDmg = async ({ repository, tag, assets }) => {
if (process.platform !== "darwin") {
- throw new Error("Final DMG installation requires macOS; use --skip-install elsewhere.");
+ throw new Error("Final DMG installation requires macOS.");
}
const { asset: dmg, version: nativeVersion } = selectPublishedDmg(assets);
@@ -1172,7 +1172,7 @@ const releaseMain = async (options) => {
]);
console.log(`[release] ${tag} is complete; Demo deployment is not blocking completion`);
- if (!options.skipInstall) {
+ if (options.installDesktop) {
await installReleaseDmg({
repository: options.repository,
tag,
diff --git a/scripts/release.test.mjs b/scripts/release.test.mjs
index c3483851..1d9906ea 100644
--- a/scripts/release.test.mjs
+++ b/scripts/release.test.mjs
@@ -78,6 +78,26 @@ describe("release automation", () => {
});
});
+ test("keeps post-release desktop installation explicitly opt-in", () => {
+ expect(parseReleaseArgs([
+ "--issue-title", "Release",
+ "--bump", "patch",
+ "--label", "maintenance",
+ "--change-en", "Update the release flow.",
+ "--change-zh", "更新发布流程。",
+ "--change-commit", "abc1234",
+ ])).toMatchObject({ installDesktop: false });
+ expect(parseReleaseArgs([
+ "--issue-title", "Release",
+ "--bump", "patch",
+ "--label", "maintenance",
+ "--change-en", "Update the release flow.",
+ "--change-zh", "更新发布流程。",
+ "--change-commit", "abc1234",
+ "--install-desktop",
+ ])).toMatchObject({ installDesktop: true });
+ });
+
test("rejects mismatched bilingual changes", () => {
expect(() =>
parseReleaseArgs([