chore: check

This commit is contained in:
xilesun 2024-08-31 22:55:36 +08:00
parent 2fc5e55f4d
commit 3ac8bf5ab0

View File

@ -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');