diff --git a/packages/maker/deb/src/Config.ts b/packages/maker/deb/src/Config.ts index f13adca1a8..0b9faa719c 100644 --- a/packages/maker/deb/src/Config.ts +++ b/packages/maker/deb/src/Config.ts @@ -209,5 +209,6 @@ export interface MakerDebConfigOptions { } export interface MakerDebConfig { + name?: string; options?: MakerDebConfigOptions; } diff --git a/packages/maker/deb/src/MakerDeb.ts b/packages/maker/deb/src/MakerDeb.ts index b92c11276d..21b8b6c79f 100644 --- a/packages/maker/deb/src/MakerDeb.ts +++ b/packages/maker/deb/src/MakerDeb.ts @@ -31,20 +31,23 @@ export default class MakerDeb extends MakerBase { return this.isInstalled('electron-installer-debian'); } - async make({ dir, makeDir, targetArch }: MakerOptions): Promise { + async make({ dir, makeDir, appName, packageJSON, targetArch, forgeConfig }: MakerOptions): Promise { // eslint-disable-next-line node/no-missing-require const installer = require('electron-installer-debian'); const outDir = path.resolve(makeDir, 'deb', targetArch); + const name = this.config.name || `${appName}_${packageJSON.version}_${debianArch(targetArch)}`; await this.ensureDirectory(outDir); const { packagePaths } = await installer({ - options: {}, ...this.config, + bin: forgeConfig.packagerConfig.executableName || appName, arch: debianArch(targetArch), src: dir, dest: outDir, - rename: undefined, + rename: (dest: string) => { + return path.join(dest, `${name}.deb`); + }, }); return packagePaths;