fix(release): optimize release script

This commit is contained in:
xilesun 2024-09-06 17:51:53 +08:00
parent 081ba44ae8
commit ae02c86378

View File

@ -252,6 +252,10 @@ async function generateChangelog() {
cn: '插件', cn: '插件',
}, },
}; };
const referenceLocale = {
en: 'Reference: ',
cn: '参考文档:',
};
const generate = (changelogs, lang) => { const generate = (changelogs, lang) => {
let result = ''; let result = '';
@ -270,7 +274,7 @@ async function generateChangelog() {
continue; continue;
} }
const pr = pro ? '' : ` ([#${number}](https://github.com/nocobase/nocobase/pull/${number}))`; const pr = pro ? '' : ` ([#${number}](https://github.com/nocobase/nocobase/pull/${number}))`;
const doc = docTitle && docLink ? `Reference: [${docTitle}](${docLink})` : ''; const doc = docTitle && docLink ? `${referenceLocale[lang]}[${docTitle}](${docLink})` : '';
lists.push(`${description}${pr} by @${author}\n${doc}`); lists.push(`${description}${pr} by @${author}\n${doc}`);
} }
if (!lists.length) { if (!lists.length) {