vue-vben-admin/build/script/changelog.ts

25 lines
586 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// #!/usr/bin/env node
import { sh } from 'tasksfile';
import { errorConsole, successConsole } from '../utils';
export const runChangeLog = async () => {
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');
} catch (error) {
errorConsole('CHANGE_LOG.md generated error\n' + error);
process.exit(1);
}
};