From 9164e04e29c5b03aaa2a56f57bca3e208f2fba26 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Wed, 8 Nov 2023 02:51:34 -0800 Subject: [PATCH] Better appId and productName Summary: As to not conflict with non-electron installations, this will ensure the product name and app id matches the installation. By doing this, both Flipper installations can co-exist, which I think is desirable. Reviewed By: antonk52 Differential Revision: D51078955 fbshipit-source-id: fabaa6eb2a45ac542297b0456a09e938a2ec2e0b --- desktop/scripts/build-release.tsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/desktop/scripts/build-release.tsx b/desktop/scripts/build-release.tsx index 8e79ee791..c71a3937a 100755 --- a/desktop/scripts/build-release.tsx +++ b/desktop/scripts/build-release.tsx @@ -210,6 +210,13 @@ async function buildDist(buildFolder: string) { const targetsRaw: Map>[] = []; const postBuildCallbacks: (() => void)[] = []; + const productName = process.env.FLIPPER_REACT_NATIVE_ONLY + ? 'Flipper-Electron' + : 'Flipper'; + const appId = process.env.FLIPPER_REACT_NATIVE_ONLY + ? 'com.facebook.sonar-electron' + : `com.facebook.sonar`; + if (argv.mac || argv['mac-dmg']) { let macPath = path.join( distDir, @@ -226,10 +233,14 @@ async function buildDist(buildFolder: string) { } } postBuildCallbacks.push(() => - spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], { - cwd: macPath, - encoding: 'utf-8', - }), + spawn( + 'zip', + ['-qyr9', `../${productName}-mac.zip`, `${productName}.app`], + { + cwd: macPath, + encoding: 'utf-8', + }, + ), ); } if (argv.linux || argv['linux-deb'] || argv['linux-snap']) { @@ -268,8 +279,8 @@ async function buildDist(buildFolder: string) { await build({ publish: 'never', config: { - appId: `com.facebook.sonar`, - productName: 'Flipper', + appId, + productName, directories: { buildResources: buildFolder, output: distDir,