ci: fixed bump-version script
This commit is contained in:
parent
0e6f0bc14c
commit
2c05c7676a
scripts
@ -30,7 +30,7 @@ const flatPrefixes = Object.values(prefixes).flat();
|
||||
/** @type {Record<string, { title: string; content: (string | { title: string; messages: string[] })[] }>} */
|
||||
const prefixToMdMap = {
|
||||
feat: { title: 'Features', content: [] },
|
||||
feat: { title: 'Enhancements', content: [] },
|
||||
enhance: { title: 'Enhancements', content: [] },
|
||||
fix: { title: 'Fixes', content: [] },
|
||||
style: { title: 'Styles', content: [] },
|
||||
docs: { title: 'Documentations', content: [] },
|
||||
@ -67,7 +67,7 @@ exec(gitLogCommand, async (err, stdout) => {
|
||||
(prId ? `[#${prId}](${repoUrl}/pull/${prId})` : '') +
|
||||
`[\`${hash.substring(0, 10)}\`](${repoUrl}/commit/${hash}) - ${message.replace(prefixReplaceRegex, '')}`;
|
||||
|
||||
const content = prefixToMdMap[messagePrefixMatch[2]].content;
|
||||
const content = prefixToMdMap[messagePrefixMatch[2]]?.content || [];
|
||||
if (messagePrefixMatch[4]) {
|
||||
const idk = content.find(c => typeof c === 'object' && c.title === messagePrefixMatch[4]);
|
||||
if (!idk) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/** Add leading-zero */
|
||||
const padNums = num => String(num).padStart(2, '0');
|
||||
export const padNums = num => String(num).padStart(2, '0');
|
||||
/** Get a time-string which is formatted like HH:mm:ss */
|
||||
const getTime = () => {
|
||||
const currDate = new Date();
|
||||
|
Loading…
Reference in New Issue
Block a user