Skip to content

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

fix(release): require Japanese App Store What's New at dry-run

tianma-ifeb8b8928641a
diff --git a/docs/release.md b/docs/release.md
index 3590c6e3..d316944a 100644
--- a/docs/release.md
+++ b/docs/release.md
@@ -18,10 +18,12 @@ bun run release -- \
--label enhancement \
--change-en "Run required release checks in parallel." \
--change-zh "并行执行发布所需检查。" \
+ --change-locale "ja:必要なリリースチェックを並列実行します。" \
--change-commit "abcdef1"
```
-Repeat `--change-en`, `--change-zh`, and `--change-commit` as matching groups.
+Repeat `--change-en`, `--change-zh`, `--change-locale ja:`, and `--change-commit` as matching groups.
+Japanese What's New is required because the App Store listing includes Japanese.
One change may cover multiple comma-separated commits:
```bash
diff --git a/docs/release.zh-CN.md b/docs/release.zh-CN.md
index 62c6e458..cf62e028 100644
--- a/docs/release.zh-CN.md
+++ b/docs/release.zh-CN.md
@@ -18,11 +18,13 @@ bun run release -- \
--label enhancement \
--change-en "Run required release checks in parallel." \
--change-zh "并行执行发布所需检查。" \
+ --change-locale "ja:必要なリリースチェックを並列実行します。" \
--change-commit "abcdef1"
```
-多项变化需要按组重复传入 `--change-en`、`--change-zh` 和
-`--change-commit`。一项变化可以关联多个以逗号分隔的提交:
+多项变化需要按组重复传入 `--change-en`、`--change-zh`、
+`--change-locale ja:` 和 `--change-commit`。App Store 列表含日文,因此必须提供
+日文 What’s New。一项变化可以关联多个以逗号分隔的提交:
```bash
--change-commit "abcdef1,1234567"
diff --git a/scripts/release.mjs b/scripts/release.mjs
index 8bb1a272..56049903 100644
--- a/scripts/release.mjs
+++ b/scripts/release.mjs
@@ -67,9 +67,10 @@ const usage = `Usage:
--label bug \\
--change-en "English user-facing change" \\
--change-zh "中文用户更新说明" \\
+ --change-locale "ja:日本語のユーザー向け説明" \\
--change-commit "abcdef1"
-Repeat --change-en, --change-zh, and --change-commit for multiple paired release bullets.
+Repeat --change-en, --change-zh, --change-locale ja:, and --change-commit for multiple paired release bullets.
Use comma-separated SHAs when one bullet covers multiple commits. Every other
commit requires --ignore-commit "abcdef1:reason".
@@ -80,7 +81,7 @@ Options:
--label <label> Required Issue label; may be repeated
--change-en <text> Required English release bullet; may be repeated
--change-zh <text> Required Chinese release bullet; may be repeated
- --change-locale <tag:text> Optional localized bullet; repeat once per change and locale
+ --change-locale <tag:text> Required Japanese bullet as ja: or ja-JP:; other locales optional
--change-commit <sha,...> Commits covered by the corresponding bilingual bullet
--ignore-commit <sha:why> Explicitly exclude a non-user-facing commit; may be repeated
--install-desktop Install and launch the final DMG after publication
@@ -189,6 +190,11 @@ export const parseReleaseArgs = (argv) => {
throw new Error(`--change-locale ${locale} must provide one translation for every release change.`);
}
}
+ if (!localizedChanges.ja && !localizedChanges["ja-JP"]) {
+ throw new Error(
+ "--change-locale ja is required because the App Store listing includes Japanese What's New.",
+ );
+ }
options.localizedChanges = localizedChanges;
return options;
};
diff --git a/scripts/release.test.mjs b/scripts/release.test.mjs
index 91824b65..db80afb6 100644
--- a/scripts/release.test.mjs
+++ b/scripts/release.test.mjs
@@ -290,6 +290,7 @@ describe("release automation", () => {
"--label", "maintenance",
"--change-en", "Update the release flow.",
"--change-zh", "更新发布流程。",
+ "--change-locale", "ja:リリースフローを更新します。",
"--change-commit", "abc1234",
])).toMatchObject({ installDesktop: false });
expect(parseReleaseArgs([
@@ -298,11 +299,31 @@ describe("release automation", () => {
"--label", "maintenance",
"--change-en", "Update the release flow.",
"--change-zh", "更新发布流程。",
+ "--change-locale", "ja:リリースフローを更新します。",
"--change-commit", "abc1234",
"--install-desktop",
])).toMatchObject({ installDesktop: true });
});
+ test("requires Japanese App Store What's New", () => {
+ expect(() =>
+ parseReleaseArgs([
+ "--issue-title",
+ "Missing Japanese notes",
+ "--bump",
+ "patch",
+ "--label",
+ "bug",
+ "--change-en",
+ "Fix a bug.",
+ "--change-zh",
+ "修复问题。",
+ "--change-commit",
+ "abc1234",
+ ]),
+ ).toThrow("--change-locale ja is required");
+ });
+
test("rejects mismatched bilingual changes", () => {
expect(() =>
parseReleaseArgs([