From d7bfa993a5939f808b162f831988a8bf82d5c10d Mon Sep 17 00:00:00 2001 From: Joao Alves Date: Mon, 4 May 2020 06:13:50 -0700 Subject: [PATCH] Add deb target to linux build (#1093) Summary: I'm adding the `.deb` option to linux build, it makes easier to install. ```bash cd desktop yarn build --linux --linux-deb ``` ## Changelog - Add deb target to linux build Pull Request resolved: https://github.com/facebook/flipper/pull/1093 Reviewed By: mweststrate Differential Revision: D21378807 Pulled By: passy fbshipit-source-id: a72a85705d3c464cddd80091d38c92012bdbee2c --- desktop/package.json | 16 ++++++++++++++-- desktop/scripts/build-release.ts | 7 +++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/desktop/package.json b/desktop/package.json index bbffa96f8..b4a7a1aed 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -3,7 +3,12 @@ "version": "0.40.0", "description": "Mobile development tool", "productName": "Flipper", - "author": "Facebook Inc", + "author": { + "name": "Facebook Inc", + "email": "n/a", + "url": "https://github.com/facebook" + }, + "homepage": "https://fbflipper.com/", "icon": "icon.png", "category": "facebook-intern", "privileged": true, @@ -42,6 +47,13 @@ "NSUserNotificationAlertStyle": "alert" } }, + "linux": { + "icon": "icon.icns", + "category": "Development" + }, + "deb": { + "icon": "icon.icns" + }, "dmg": { "background": "dmgBackground.png", "icon": "icon.icns", @@ -232,7 +244,7 @@ "lint": "yarn lint:eslint && yarn lint:flow && yarn lint:tsc", "bump-versions": "./ts-node scripts/bump-versions.ts", "publish-packages": "./ts-node scripts/publish-packages.ts", - "everything": "yarn reset && yarn install && yarn lint && yarn test && yarn test-electron && yarn build --mac --mac-dmg --win --linux && yarn build-headless --mac --linux && yarn start" + "everything": "yarn reset && yarn install && yarn lint && yarn test && yarn test-electron && yarn build --mac --mac-dmg --win --linux --linux-deb && yarn build-headless --mac --linux && yarn start" }, "optionalDependencies": { "7zip-bin-mac": "^1.0.1" diff --git a/desktop/scripts/build-release.ts b/desktop/scripts/build-release.ts index b6b67dcb6..8a730540d 100755 --- a/desktop/scripts/build-release.ts +++ b/desktop/scripts/build-release.ts @@ -80,6 +80,13 @@ async function buildDist(buildFolder: string) { } if (process.argv.indexOf('--linux') > -1) { targetsRaw.push(Platform.LINUX.createTarget(['zip'])); + + const argv = process.argv.slice(2); + if (argv.indexOf('--linux-deb') > -1) { + // linux targets can be: + // AppImage, snap, deb, rpm, freebsd, pacman, p5p, apk, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir + targetsRaw.push(Platform.LINUX.createTarget(['deb'])); + } } if (process.argv.indexOf('--win') > -1) { targetsRaw.push(Platform.WINDOWS.createTarget(['zip']));