* chore(dependencies): update electron-builder and related dependencies to version 26.0.15 * chore(electron-builder): update portable build configuration and clean up artifact build script - Set buildUniversalInstaller to false for portable builds in electron-builder configuration. - Removed obsolete condition for deleting portable files in artifact build completion script.
19 lines
550 B
JavaScript
19 lines
550 B
JavaScript
const fs = require('fs')
|
|
|
|
exports.default = function (buildResult) {
|
|
try {
|
|
console.log('[artifact build completed] rename artifact file...')
|
|
if (!buildResult.file.includes(' ')) {
|
|
return
|
|
}
|
|
|
|
let oldFilePath = buildResult.file
|
|
const newfilePath = oldFilePath.replace(/ /g, '-')
|
|
fs.renameSync(oldFilePath, newfilePath)
|
|
buildResult.file = newfilePath
|
|
console.log(`[artifact build completed] rename file ${oldFilePath} to ${newfilePath} `)
|
|
} catch (error) {
|
|
console.error('Error renaming file:', error)
|
|
}
|
|
}
|