mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-12-05 05:08:30 +08:00
a51feb0311
* feat: update extension UI * fix(components): [manage-access] a tag rename to span * feat: update e2e Co-authored-by: buqiyuan <1743369777@qq.com> Co-authored-by: 夜鹰 <17kungfuboy@gmail.com>
26 lines
752 B
JavaScript
26 lines
752 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
// 模板文件
|
|
const inputPath = path.join(__dirname, '../build/SetupScripts/nim/nim_setup.temp.nsi');
|
|
// 输出文件
|
|
const outputPath = path.join(__dirname, '../build/SetupScripts/nim/nim_setup.nsi');
|
|
|
|
const version = process.env.npm_package_version;
|
|
|
|
fs.readFile(inputPath, 'utf8', (err, data) => {
|
|
if (err) {
|
|
return console.error('before NSIS build readFile', err);
|
|
}
|
|
|
|
let text = data.toString();
|
|
text = text.replace('#{PRODUCT_VERSION}', `${version}.0`);
|
|
text = text.replace('#{INSTALL_OUTPUT_NAME}', version);
|
|
|
|
fs.writeFile(outputPath, text, { flag: 'w', encoding: 'utf8' }, err => {
|
|
if (err) {
|
|
console.error('before NSIS build writeFile', err);
|
|
}
|
|
});
|
|
});
|