Avoid template copy
Summary: As mentioned on the previous diff, we no longer use a pre-built template when creating a release build. This change moves the built binary directly into place instead of updating the existing template after which it was moved to its final destination. Reviewed By: antonk52 Differential Revision: D51424944 fbshipit-source-id: 284fb53bb5f00f92b3ca9db3b28cfd1e4dacfa19
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e3038a3393
commit
ec9bc8a29f
@@ -744,7 +744,6 @@ async function setUpMacBundle(
|
|||||||
): Promise<{nodePath: string; resourcesPath: string}> {
|
): Promise<{nodePath: string; resourcesPath: string}> {
|
||||||
console.log(`⚙️ Creating Mac bundle in ${outputDir}`);
|
console.log(`⚙️ Creating Mac bundle in ${outputDir}`);
|
||||||
|
|
||||||
let appTemplate = path.join(staticDir, 'flipper-server-app-template');
|
|
||||||
if (isFB) {
|
if (isFB) {
|
||||||
const {BuildArchitecture, buildFlipperServer} = await import(
|
const {BuildArchitecture, buildFlipperServer} = await import(
|
||||||
// @ts-ignore only used inside Meta
|
// @ts-ignore only used inside Meta
|
||||||
@@ -760,19 +759,15 @@ async function setUpMacBundle(
|
|||||||
`⚙️ Successfully built platform: ${platform}, output: ${outputPath}`,
|
`⚙️ Successfully built platform: ${platform}, output: ${outputPath}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
appTemplate = path.join(
|
const appPath = path.join(outputDir, 'Flipper.app');
|
||||||
staticDir,
|
await fs.emptyDir(appPath);
|
||||||
'facebook',
|
|
||||||
'flipper-server-app-template',
|
|
||||||
platform,
|
|
||||||
);
|
|
||||||
|
|
||||||
await fs.copy(outputPath, path.join(appTemplate, 'Flipper.app'));
|
await fs.copy(outputPath, appPath);
|
||||||
console.info('⚙️ Using internal template from: ' + appTemplate);
|
} else {
|
||||||
|
const template = path.join(staticDir, 'flipper-server-app-template');
|
||||||
|
await fs.copy(template, outputDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
await fs.copy(appTemplate, outputDir);
|
|
||||||
|
|
||||||
function replacePropertyValue(
|
function replacePropertyValue(
|
||||||
obj: any,
|
obj: any,
|
||||||
targetValue: string,
|
targetValue: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user