Skip to content

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

fix: standardize release titles

tianma-if76a41bbac7cf
diff --git a/docs/release.md b/docs/release.md
index ff173ee9..c3c0e69a 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -65,6 +65,8 @@ marketing versions change only when that native runtime is rebuilt. Android
`versionCode` and iOS build numbers remain independent, monotonically increasing
store build identifiers.
+Stable tags and their GitHub Release titles both use `vX.Y.Z`.
+
When verified DMGs or an APK are reused, their original filenames and native
versions remain unchanged. Every formal Release contains separate macOS arm64
and x64 DMGs plus architecture-specific updater ZIPs. Desktop and Android update
diff --git a/docs/release.zh-CN.md b/docs/release.zh-CN.md
index e48b84ec..3caffa88 100644
--- a/docs/release.zh-CN.md
+++ b/docs/release.zh-CN.md
@@ -54,6 +54,8 @@ GitHub 状态。`--skip-install` 会跳过发布后的 DMG 安装,仅适用于
对应的原生展示版本。Android `versionCode` 和 iOS Build Number 继续作为独立、
严格递增的商店构建标识。
+正式 Tag 及其对应的 GitHub Release 标题均统一使用 `vX.Y.Z`。
+
复用已验证的 DMG 或 APK 时,保留其原始文件名和原生版本。每个正式 Release
都同时包含独立的 macOS arm64 与 x64 DMG,以及按架构区分的更新 ZIP。桌面端
和 Android 更新检查从各自在 Release 中的资产读取适用版本,而不是直接比较
diff --git a/scripts/release.mjs b/scripts/release.mjs
index 3478d530..7c625975 100644
--- a/scripts/release.mjs
+++ b/scripts/release.mjs
@@ -161,6 +161,13 @@ export const nextVersion = (version, bump) => {
return `${major}.${minor}.${patch + 1}`;
};
+export const buildReleaseTitle = (tag) => {
+ if (!/^v\d+\.\d+\.\d+$/.test(tag)) {
+ throw new Error(`Expected a stable vX.Y.Z tag, received: ${tag}`);
+ }
+ return tag;
+};
+
export const buildIssueBody = ({ changesEn, changesZh }) => [
"## Summary",
"",
@@ -778,7 +785,7 @@ const releaseMain = async (options) => {
"--target",
releaseSha,
"--title",
- tag,
+ buildReleaseTitle(tag),
"--draft",
"--notes",
notes,
diff --git a/scripts/release.test.mjs b/scripts/release.test.mjs
index 9332e3d3..cc136ba2 100644
--- a/scripts/release.test.mjs
+++ b/scripts/release.test.mjs
@@ -2,6 +2,7 @@ import { describe, expect, test } from "bun:test";
import {
buildIssueBody,
buildReleaseNotes,
+ buildReleaseTitle,
nextVersion,
parseReleaseArgs,
reusedAssetMatches,
@@ -55,6 +56,11 @@ describe("release automation", () => {
expect(() => nextVersion("1.6.50", "automatic")).toThrow("patch, minor, or major");
});
+ test("uses the stable tag as the GitHub Release title", () => {
+ expect(buildReleaseTitle("v1.6.55")).toBe("v1.6.55");
+ expect(() => buildReleaseTitle("1.6.55")).toThrow("stable vX.Y.Z tag");
+ });
+
test("requires an explicit version bump", () => {
expect(() =>
parseReleaseArgs([