mirror of
https://github.com/ILoveBingLu/CipherTalk.git
synced 2026-05-11 14:01:48 +08:00
Disable mac dmg update info generation
This commit is contained in:
@@ -142,10 +142,22 @@ function getAsarUnpack(buildTarget) {
|
||||
return baseAsarUnpack
|
||||
}
|
||||
|
||||
function getDmg(buildTarget) {
|
||||
if (buildTarget === 'mac') {
|
||||
return {
|
||||
...(base.dmg || {}),
|
||||
writeUpdateInfo: false
|
||||
}
|
||||
}
|
||||
|
||||
return base.dmg
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
...base,
|
||||
files: getFiles(target),
|
||||
asarUnpack: getAsarUnpack(target),
|
||||
dmg: getDmg(target),
|
||||
extraResources: getExtraResources(target),
|
||||
extraFiles: getExtraFiles(target)
|
||||
}
|
||||
|
||||
@@ -13,26 +13,6 @@ if (!target || !['win', 'mac'].includes(target)) {
|
||||
const cliPath = require.resolve('electron-builder/cli.js')
|
||||
const configPath = path.join(__dirname, 'electron-builder.config.cjs')
|
||||
|
||||
function cleanupBlockmapFiles(buildTarget) {
|
||||
if (buildTarget !== 'mac') {
|
||||
return
|
||||
}
|
||||
|
||||
const releaseDir = path.join(__dirname, '..', 'release')
|
||||
if (!fs.existsSync(releaseDir)) {
|
||||
return
|
||||
}
|
||||
|
||||
for (const name of fs.readdirSync(releaseDir)) {
|
||||
if (!name.endsWith('.dmg.blockmap')) {
|
||||
continue
|
||||
}
|
||||
|
||||
fs.rmSync(path.join(releaseDir, name), { force: true })
|
||||
console.log(`🧹 Removed obsolete blockmap: ${name}`)
|
||||
}
|
||||
}
|
||||
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[cliPath, `--${target}`, '--publish', 'never', '--config', configPath],
|
||||
@@ -53,5 +33,3 @@ const artifactName = target === 'mac'
|
||||
if (!fs.existsSync(path.join(__dirname, '..', artifactName))) {
|
||||
process.exit(result.status || 1)
|
||||
}
|
||||
|
||||
cleanupBlockmapFiles(target)
|
||||
|
||||
Reference in New Issue
Block a user