Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/maker/dmg/src/MakerDMG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ export default class MakerDMG extends MakerBase<MakerDMGConfig> {

async make({ dir, makeDir, appName, packageJSON, targetArch }: MakerOptions): Promise<string[]> {
const { createDMG } = require('electron-installer-dmg');

const outPath = path.resolve(makeDir, `${this.config.name || appName}.dmg`);
const dmgName = `${this.config.name || appName}_${targetArch}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this mean that all DMGs will have the arch suffix going forward?

  1. I'd much prefer my DMGs not to have that extension.
  2. I assume it would be a breaking change for some people. The way my update server is written, it would break if the DMG name suddenly changes.

IMO it should be configurable whether to have the arch in the file name (if it's even an option at all).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i will provide a option to enable or not

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),
};
Expand Down
2 changes: 1 addition & 1 deletion packages/maker/dmg/test/MakerDMG_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
});
Expand Down