vben-admin-thin-next/build/script/changelog.ts

27 lines
603 B
TypeScript
Raw Normal View History

2020-09-28 20:19:10 +08:00
// #!/usr/bin/env node
import { sh } from 'tasksfile';
import { errorConsole, successConsole } from '../utils';
2020-09-28 20:19:10 +08:00
export const runChangeLog = async () => {
2020-09-28 20:19:10 +08:00
try {
let cmd = `conventional-changelog -p custom-config -i CHANGELOG.md -s -r 0 `;
await sh(cmd, {
async: true,
nopipe: true,
});
await sh('prettier --write **/CHANGELOG.md ', {
async: true,
nopipe: true,
});
successConsole('CHANGE_LOG.md generated successfully');
2020-09-28 20:19:10 +08:00
} catch (error) {
errorConsole('CHANGE_LOG.md generated error\n' + error);
2020-09-28 20:19:10 +08:00
process.exit(1);
}
};
2020-10-26 21:45:43 +08:00
runChangeLog();