Skip to content

Commit

Permalink
feat(maker): add the deb maker for the linux target
Browse files Browse the repository at this point in the history
Requires the app's "description" to be non-blank.
  • Loading branch information
malept authored and MarshallOfSound committed Dec 4, 2016
1 parent b3b616a commit 5c5ce67
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"colors": "^1.1.2",
"commander": "^2.9.0",
"debug": "^2.3.3",
"electron-installer-debian": "^0.4.0",
"electron-installer-dmg": "^0.1.2",
"electron-packager": "^8.3.0",
"electron-winstaller": "^2.5.0",
Expand Down
19 changes: 19 additions & 0 deletions src/makers/linux/deb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import installer from 'electron-installer-debian';
import path from 'path';
import pify from 'pify';

import { ensureFile } from '../../util/ensure-output';

export default async (dir, appName, forgeConfig) => {
const outPath = path.resolve(dir, '../make/debian');

await ensureFile(outPath);
const debianDefaults = {
arch: process.arch, // DOES NOT WORK WITH ARM
dest: outPath,
src: dir,
};
const debianConfig = Object.assign({}, forgeConfig.electronInstallerDebian, debianDefaults);

await pify(installer)(debianConfig);
};
2 changes: 1 addition & 1 deletion tmpl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "",
"productName": "",
"version": "1.0.0",
"description": "",
"description": "My Electron application description",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start"
Expand Down

0 comments on commit 5c5ce67

Please sign in to comment.