From 3ac8bf5ab0763c7983c5520918dd024390775d48 Mon Sep 17 00:00:00 2001 From: xilesun <2013xile@gmail.com> Date: Sat, 31 Aug 2024 22:55:36 +0800 Subject: [PATCH] chore: check --- scripts/release/writeChangelog.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/release/writeChangelog.js b/scripts/release/writeChangelog.js index 04838d65d7..22442f762c 100644 --- a/scripts/release/writeChangelog.js +++ b/scripts/release/writeChangelog.js @@ -302,6 +302,9 @@ async function generateChangelog() { async function writeChangelog() { const { cn, en, to } = await generateChangelog(); + if (!cn && !en) { + throw new Error('No changelog generated'); + } const write = async (lang) => { const file = lang === 'cn' ? 'CHANGELOG.zh-CN.md' : 'CHANGELOG.md'; const oldChangelog = await fs.readFile(path.join(__dirname, `../../${file}`), 'utf8');