|
1
2
|
// #!/usr/bin/env node
|
vben
authored
|
3
4
|
import { sh } from 'tasksfile';
import { errorConsole, successConsole } from '../utils';
|
|
5
|
|
nebv
authored
|
6
|
export const runChangeLog = async () => {
|
|
7
|
try {
|
vben
authored
|
8
9
10
11
12
13
14
15
16
17
|
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,
});
|
nebv
authored
|
18
|
successConsole('CHANGE_LOG.md generated successfully!');
|
|
19
|
} catch (error) {
|
nebv
authored
|
20
21
|
errorConsole('CHANGE_LOG.md generated error\n' + error);
|
|
22
23
24
|
process.exit(1);
}
};
|
vben
authored
|
25
26
|
runChangeLog();
|