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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3dc9cc5d3d
commit
9164e04e29
@@ -210,6 +210,13 @@ async function buildDist(buildFolder: string) {
|
||||
const targetsRaw: Map<Platform, Map<Arch, string[]>>[] = [];
|
||||
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'], {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user