Permalink
Browse files
fix(maker): handle name option for the deb, rpm makers as well as dmg
- Loading branch information
Showing
with
8 additions
and
4 deletions.
-
+4
−2
src/makers/linux/deb.js
-
+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