Files
cherry-studio/scripts/artifact-build-completed.js
beyondkmp 5ceb2af056 chore(dependencies): update electron-builder to 26.0.15 (#5651)
* 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.
2025-05-04 18:34:43 +08:00

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)
}
}