Blame view

build/script/changelog.ts 603 Bytes
陈文彬 authored
1
2
// #!/usr/bin/env node
3
4
import { sh } from 'tasksfile';
import { errorConsole, successConsole } from '../utils';
陈文彬 authored
5
6
export const runChangeLog = async () => {
陈文彬 authored
7
  try {
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,
    });
18
    successConsole('CHANGE_LOG.md generated successfully!');
陈文彬 authored
19
  } catch (error) {
20
21
    errorConsole('CHANGE_LOG.md generated error\n' + error);
陈文彬 authored
22
23
24
    process.exit(1);
  }
};
vben authored
25
26

runChangeLog();