diff --git a/packages/maker/dmg/src/MakerDMG.ts b/packages/maker/dmg/src/MakerDMG.ts index 46778d38cb..6bb11e6c47 100644 --- a/packages/maker/dmg/src/MakerDMG.ts +++ b/packages/maker/dmg/src/MakerDMG.ts @@ -17,15 +17,15 @@ export default class MakerDMG extends MakerBase { async make({ dir, makeDir, appName, packageJSON, targetArch }: MakerOptions): Promise { const { createDMG } = require('electron-installer-dmg'); - - const outPath = path.resolve(makeDir, `${this.config.name || appName}.dmg`); + const dmgName = `${this.config.name || appName}_${targetArch}`; + const outPath = path.resolve(makeDir, `${dmgName}.dmg`); const forgeDefaultOutPath = path.resolve(makeDir, `${appName}-${packageJSON.version}-${targetArch}.dmg`); await this.ensureFile(outPath); const dmgConfig = { overwrite: true, - name: appName, ...this.config, + name: dmgName, appPath: path.resolve(dir, `${appName}.app`), out: path.dirname(outPath), }; diff --git a/packages/maker/dmg/test/MakerDMG_spec.ts b/packages/maker/dmg/test/MakerDMG_spec.ts index 704d6fe51a..9d8045c027 100644 --- a/packages/maker/dmg/test/MakerDMG_spec.ts +++ b/packages/maker/dmg/test/MakerDMG_spec.ts @@ -67,7 +67,7 @@ describe('MakerDMG', () => { const opts = eidStub.firstCall.args[0]; expect(opts).to.deep.equal({ overwrite: true, - name: appName, + name: `${appName}_${targetArch}`, appPath: path.resolve(`${dir}/My Test App.app`), out: path.resolve(`${dir.substr(0, dir.length - 4)}/make`), });