From 5c5ce67a79cad7720f1545aead634fb18ab4a75d Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sat, 3 Dec 2016 20:41:00 -0800 Subject: [PATCH] feat(maker): add the deb maker for the linux target Requires the app's "description" to be non-blank. --- package.json | 1 + src/makers/linux/deb.js | 19 +++++++++++++++++++ tmpl/package.json | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/makers/linux/deb.js diff --git a/package.json b/package.json index dbca6dae45..346bb086ff 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/makers/linux/deb.js b/src/makers/linux/deb.js new file mode 100644 index 0000000000..1d25a0254c --- /dev/null +++ b/src/makers/linux/deb.js @@ -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); +}; diff --git a/tmpl/package.json b/tmpl/package.json index bd1a756206..23e0929120 100644 --- a/tmpl/package.json +++ b/tmpl/package.json @@ -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"