postcat/build/afterBuild.js
2022-06-08 11:08:36 +08:00

12 lines
312 B
JavaScript

const fs = require('fs');
const glob = require('glob');
const { resolve } = require('path');
glob.sync(resolve('./release', './*.exe')).forEach((item, i) => {
const newName = item.replace(/ /g, '-');
fs.rename(item, newName, (err) => {
if (err) throw err;
console.log('Rename complete!');
});
});