Skip to content
Permalink
Browse files

fix(maker): handle name option for the deb, rpm makers as well as dmg

  • Loading branch information
MarshallOfSound authored and malept committed Jun 2, 2017
1 parent 0ea55fa commit d335741a6131260d3b77d1309cb2007024e18104
Showing with 8 additions and 4 deletions.
  1. +4 −2 src/makers/linux/deb.js
  2. +4 −2 src/makers/linux/rpm.js
@@ -21,15 +21,17 @@ export default async ({ dir, targetArch, forgeConfig, packageJSON }) => {
const installer = require('electron-installer-debian');

const arch = debianArch(targetArch);
const outPath = path.resolve(dir, '../make', `${packageJSON.name}_${packageJSON.version}_${arch}.deb`);
const userConfig = configFn(forgeConfig.electronInstallerDebian, targetArch);
const versionedName = `${packageJSON.name}_${packageJSON.version}_${arch}`;
const outPath = path.resolve(dir, '../make', `${userConfig.name || versionedName}.deb`);

await ensureFile(outPath);
const debianDefaults = {
arch,
dest: path.dirname(outPath),
src: dir,
};
const debianConfig = Object.assign({}, configFn(forgeConfig.electronInstallerDebian, targetArch), debianDefaults);
const debianConfig = Object.assign({}, userConfig, debianDefaults);

await pify(installer)(debianConfig);
return [outPath];
@@ -21,15 +21,17 @@ export default async ({ dir, targetArch, forgeConfig, packageJSON }) => {
const installer = require('electron-installer-redhat');

const arch = rpmArch(targetArch);
const outPath = path.resolve(dir, '../make', `${packageJSON.name}-${packageJSON.version}.${arch}.rpm`);
const userConfig = configFn(forgeConfig.electronInstallerRedhat, targetArch);
const versionedName = `${packageJSON.name}-${packageJSON.version}.${arch}`;
const outPath = path.resolve(dir, '../make', `${userConfig.name || versionedName}.rpm`);

await ensureFile(outPath);
const rpmDefaults = {
arch,
dest: path.dirname(outPath),
src: dir,
};
const rpmConfig = Object.assign({}, configFn(forgeConfig.electronInstallerRedhat, targetArch), rpmDefaults);
const rpmConfig = Object.assign({}, userConfig, rpmDefaults);

await pify(installer)(rpmConfig);
return [outPath];

0 comments on commit d335741

Please sign in to comment.
You can’t perform that action at this time.