mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 21:30:43 +08:00
initial commit
This commit is contained in:
39
build/script/changelog.ts
Normal file
39
build/script/changelog.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
// #!/usr/bin/env node
|
||||
|
||||
import { sh } from 'tasksfile';
|
||||
import chalk from 'chalk';
|
||||
|
||||
const createChangeLog = async () => {
|
||||
try {
|
||||
let cmd = `conventional-changelog -p angular -i CHANGELOG.md -s -r 0 `;
|
||||
// let cmd = `conventional-changelog -p angular -i CHANGELOG.md -s -r 0 `;
|
||||
// if (shell.which('git')) {
|
||||
// cmd += '&& git add CHANGELOG.md';
|
||||
// }
|
||||
await sh(cmd, {
|
||||
async: true,
|
||||
nopipe: true,
|
||||
});
|
||||
|
||||
await sh('prettier --write **/CHANGELOG.md ', {
|
||||
async: true,
|
||||
nopipe: true,
|
||||
});
|
||||
console.log(
|
||||
chalk.blue.bold('**************** ') +
|
||||
chalk.green.bold('CHANGE_LOG generated successfully!') +
|
||||
chalk.blue.bold(' ****************')
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(
|
||||
chalk.blue.red('**************** ') +
|
||||
chalk.green.red('CHANGE_LOG generated error\n' + error) +
|
||||
chalk.blue.red(' ****************')
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
createChangeLog();
|
||||
module.exports = {
|
||||
createChangeLog,
|
||||
};
|
Reference in New Issue
Block a user