RN-only build flag
Summary: Previously I had created a RN build, locally, with a few minor differences. That had to be reverted. Instead of reverting and re-applying changes, I'm introducing a flag that can be used in the interim to produce the RN-only builds. Reviewed By: LukeDefeo Differential Revision: D50555055 fbshipit-source-id: edface9a1587fb51e54eebe73724032baf985c83
This commit is contained in:
committed by
Facebook GitHub Bot
parent
05242b4ee9
commit
94120d61aa
@@ -39,6 +39,10 @@ export async function getEnvironmentInfo(
|
|||||||
process.env.FLIPPER_FORCE_VERSION ??
|
process.env.FLIPPER_FORCE_VERSION ??
|
||||||
(isProduction ? packageJson.version : '0.0.0');
|
(isProduction ? packageJson.version : '0.0.0');
|
||||||
|
|
||||||
|
if (packageJson.reactNativeOnly) {
|
||||||
|
process.env.FLIPPER_REACT_NATIVE_ONLY = 'true';
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
processId: process.pid,
|
processId: process.pid,
|
||||||
isProduction,
|
isProduction,
|
||||||
|
|||||||
@@ -73,6 +73,11 @@ const argv = yargs
|
|||||||
'Unique build identifier to be used as the version patch part for the build',
|
'Unique build identifier to be used as the version patch part for the build',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
'react-native-only': {
|
||||||
|
description: 'React Native only build',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
channel: {
|
channel: {
|
||||||
description: 'Release channel for the build',
|
description: 'Release channel for the build',
|
||||||
choices: ['stable', 'insiders'],
|
choices: ['stable', 'insiders'],
|
||||||
@@ -115,6 +120,10 @@ if (argv['default-plugins-dir']) {
|
|||||||
process.env.FLIPPER_DEFAULT_PLUGINS_DIR = argv['default-plugins-dir'];
|
process.env.FLIPPER_DEFAULT_PLUGINS_DIR = argv['default-plugins-dir'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argv['react-native-only']) {
|
||||||
|
process.env.FLIPPER_REACT_NATIVE_ONLY = 'true';
|
||||||
|
}
|
||||||
|
|
||||||
async function generateManifest(versionNumber: string) {
|
async function generateManifest(versionNumber: string) {
|
||||||
await fs.writeFile(
|
await fs.writeFile(
|
||||||
path.join(distDir, 'manifest.json'),
|
path.join(distDir, 'manifest.json'),
|
||||||
@@ -130,6 +139,7 @@ async function modifyPackageManifest(
|
|||||||
versionNumber: string,
|
versionNumber: string,
|
||||||
hgRevision: string | null,
|
hgRevision: string | null,
|
||||||
channel: string,
|
channel: string,
|
||||||
|
reactNativeOnly: boolean,
|
||||||
) {
|
) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('Creating package.json manifest');
|
console.log('Creating package.json manifest');
|
||||||
@@ -148,6 +158,7 @@ async function modifyPackageManifest(
|
|||||||
manifest.revision = hgRevision;
|
manifest.revision = hgRevision;
|
||||||
}
|
}
|
||||||
manifest.releaseChannel = channel;
|
manifest.releaseChannel = channel;
|
||||||
|
manifest.reactNativeOnly = reactNativeOnly;
|
||||||
await fs.writeFile(
|
await fs.writeFile(
|
||||||
path.join(buildFolder, 'package.json'),
|
path.join(buildFolder, 'package.json'),
|
||||||
JSON.stringify(manifest, null, ' '),
|
JSON.stringify(manifest, null, ' '),
|
||||||
@@ -299,7 +310,13 @@ async function copyStaticFolder(buildFolder: string) {
|
|||||||
await moveSourceMaps(dir, argv['source-map-dir']);
|
await moveSourceMaps(dir, argv['source-map-dir']);
|
||||||
const versionNumber = getVersionNumber(argv.version);
|
const versionNumber = getVersionNumber(argv.version);
|
||||||
const hgRevision = await genMercurialRevision();
|
const hgRevision = await genMercurialRevision();
|
||||||
await modifyPackageManifest(dir, versionNumber, hgRevision, argv.channel);
|
await modifyPackageManifest(
|
||||||
|
dir,
|
||||||
|
versionNumber,
|
||||||
|
hgRevision,
|
||||||
|
argv.channel,
|
||||||
|
argv['react-native-only'],
|
||||||
|
);
|
||||||
await fs.ensureDir(distDir);
|
await fs.ensureDir(distDir);
|
||||||
await generateManifest(versionNumber);
|
await generateManifest(versionNumber);
|
||||||
await buildDist(dir);
|
await buildDist(dir);
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ const argv = yargs
|
|||||||
'[FB-internal only] Will yield `true` on any GK. Disabled by default. Setting env var FLIPPER_ENABLE_ALL_GKS is equivalent',
|
'[FB-internal only] Will yield `true` on any GK. Disabled by default. Setting env var FLIPPER_ENABLE_ALL_GKS is equivalent',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
|
'react-native-only': {
|
||||||
|
description: '[FB-internal only] React Native only build',
|
||||||
|
type: 'boolean',
|
||||||
|
},
|
||||||
channel: {
|
channel: {
|
||||||
describe:
|
describe:
|
||||||
'[FB-internal only] Release channel. "stable" by default. Setting env var "FLIPPER_RELEASE_CHANNEL" is equivalent.',
|
'[FB-internal only] Release channel. "stable" by default. Setting env var "FLIPPER_RELEASE_CHANNEL" is equivalent.',
|
||||||
@@ -148,6 +152,10 @@ if (argv.channel !== undefined) {
|
|||||||
process.env.FLIPPER_RELEASE_CHANNEL = argv.channel;
|
process.env.FLIPPER_RELEASE_CHANNEL = argv.channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argv['react-native-only'] === true) {
|
||||||
|
process.env.FLIPPER_REACT_NATIVE_ONLY = 'true';
|
||||||
|
}
|
||||||
|
|
||||||
if (argv['force-version']) {
|
if (argv['force-version']) {
|
||||||
process.env.FLIPPER_FORCE_VERSION = argv['force-version'];
|
process.env.FLIPPER_FORCE_VERSION = argv['force-version'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,365 +13,185 @@
|
|||||||
"brush-paint",
|
"brush-paint",
|
||||||
"bug",
|
"bug",
|
||||||
"building-city",
|
"building-city",
|
||||||
|
|
||||||
"camcorder",
|
"camcorder",
|
||||||
|
|
||||||
"camera",
|
"camera",
|
||||||
|
|
||||||
"caution-octagon",
|
"caution-octagon",
|
||||||
|
|
||||||
"caution-triangle",
|
"caution-triangle",
|
||||||
|
|
||||||
"caution",
|
"caution",
|
||||||
|
|
||||||
"checkmark",
|
"checkmark",
|
||||||
|
|
||||||
"chevron-down-outline",
|
"chevron-down-outline",
|
||||||
|
|
||||||
"chevron-down",
|
"chevron-down",
|
||||||
|
|
||||||
"chevron-left",
|
"chevron-left",
|
||||||
|
|
||||||
"chevron-right",
|
"chevron-right",
|
||||||
|
|
||||||
"chevron-up",
|
"chevron-up",
|
||||||
|
|
||||||
"compose",
|
"compose",
|
||||||
|
|
||||||
"copy",
|
"copy",
|
||||||
|
|
||||||
"cross-circle",
|
"cross-circle",
|
||||||
|
|
||||||
"cross",
|
"cross",
|
||||||
|
|
||||||
"dashboard-outline",
|
"dashboard-outline",
|
||||||
|
|
||||||
"dashboard",
|
"dashboard",
|
||||||
|
|
||||||
"data-table",
|
"data-table",
|
||||||
|
|
||||||
"desktop",
|
"desktop",
|
||||||
|
|
||||||
"directions",
|
"directions",
|
||||||
|
|
||||||
"dots-3-circle-outline",
|
"dots-3-circle-outline",
|
||||||
|
|
||||||
"download",
|
"download",
|
||||||
|
|
||||||
"face-unhappy-outline",
|
"face-unhappy-outline",
|
||||||
|
|
||||||
"first-aid",
|
"first-aid",
|
||||||
|
|
||||||
"flash-default",
|
"flash-default",
|
||||||
|
|
||||||
"info-circle",
|
"info-circle",
|
||||||
|
|
||||||
"internet",
|
"internet",
|
||||||
|
|
||||||
"life-event-major",
|
"life-event-major",
|
||||||
|
|
||||||
"magic-wand",
|
"magic-wand",
|
||||||
|
|
||||||
"magnifying-glass",
|
"magnifying-glass",
|
||||||
|
|
||||||
"messages",
|
"messages",
|
||||||
|
|
||||||
"minus-circle",
|
"minus-circle",
|
||||||
|
|
||||||
"mobile-engagement",
|
"mobile-engagement",
|
||||||
|
|
||||||
"mobile",
|
"mobile",
|
||||||
|
|
||||||
"network",
|
"network",
|
||||||
|
|
||||||
"news-feed",
|
"news-feed",
|
||||||
|
|
||||||
"pause",
|
"pause",
|
||||||
|
|
||||||
"posts",
|
"posts",
|
||||||
|
|
||||||
"power",
|
"power",
|
||||||
|
|
||||||
"profile",
|
"profile",
|
||||||
|
|
||||||
"question-circle-outline",
|
"question-circle-outline",
|
||||||
|
|
||||||
"question-circle",
|
"question-circle",
|
||||||
|
|
||||||
"question",
|
"question",
|
||||||
|
|
||||||
"refresh-left",
|
"refresh-left",
|
||||||
|
|
||||||
"rocket",
|
"rocket",
|
||||||
|
|
||||||
"settings",
|
"settings",
|
||||||
|
|
||||||
"share-external",
|
"share-external",
|
||||||
|
|
||||||
"share",
|
"share",
|
||||||
|
|
||||||
"star-outline",
|
"star-outline",
|
||||||
|
|
||||||
"star-slash",
|
"star-slash",
|
||||||
|
|
||||||
"star",
|
"star",
|
||||||
|
|
||||||
"stop-playback",
|
"stop-playback",
|
||||||
|
|
||||||
"stop",
|
"stop",
|
||||||
|
|
||||||
"target",
|
"target",
|
||||||
|
|
||||||
"thought-bubble",
|
"thought-bubble",
|
||||||
|
|
||||||
"tools",
|
"tools",
|
||||||
|
|
||||||
"translate",
|
"translate",
|
||||||
|
|
||||||
"trash-outline",
|
"trash-outline",
|
||||||
|
|
||||||
"trash",
|
"trash",
|
||||||
|
|
||||||
"tree",
|
"tree",
|
||||||
|
|
||||||
"trending",
|
"trending",
|
||||||
|
|
||||||
"triangle-down",
|
"triangle-down",
|
||||||
|
|
||||||
"triangle-right",
|
"triangle-right",
|
||||||
|
|
||||||
"underline",
|
"underline",
|
||||||
|
|
||||||
"washing-machine",
|
"washing-machine",
|
||||||
|
|
||||||
"watch-tv",
|
"watch-tv",
|
||||||
|
|
||||||
"gears-two",
|
"gears-two",
|
||||||
|
|
||||||
"info-cursive",
|
"info-cursive",
|
||||||
|
|
||||||
"on-this-day",
|
"on-this-day",
|
||||||
|
|
||||||
"zoom-out",
|
"zoom-out",
|
||||||
|
|
||||||
"zoom-in",
|
"zoom-in",
|
||||||
|
|
||||||
"fast-forward",
|
"fast-forward",
|
||||||
|
|
||||||
"draft-outline",
|
"draft-outline",
|
||||||
|
|
||||||
"gradient",
|
"gradient",
|
||||||
|
|
||||||
"crop",
|
"crop",
|
||||||
|
|
||||||
"play",
|
"play",
|
||||||
|
|
||||||
"cross-outline",
|
"cross-outline",
|
||||||
|
|
||||||
"messenger-code",
|
"messenger-code",
|
||||||
|
|
||||||
"book",
|
"book",
|
||||||
|
|
||||||
"list-arrow-up",
|
"list-arrow-up",
|
||||||
|
|
||||||
"cat",
|
"cat",
|
||||||
|
|
||||||
"duplicate",
|
"duplicate",
|
||||||
|
|
||||||
"profile-circle-outline",
|
"profile-circle-outline",
|
||||||
|
|
||||||
"card-person",
|
"card-person",
|
||||||
|
|
||||||
"pencil-outline",
|
"pencil-outline",
|
||||||
|
|
||||||
"code",
|
"code",
|
||||||
|
|
||||||
"undo-outline",
|
"undo-outline",
|
||||||
|
|
||||||
"checkmark-circle-outline",
|
"checkmark-circle-outline",
|
||||||
|
|
||||||
"target-outline",
|
"target-outline",
|
||||||
|
|
||||||
"internet-outline",
|
"internet-outline",
|
||||||
|
|
||||||
"profile-outline",
|
"profile-outline",
|
||||||
|
|
||||||
"app-react-outline",
|
"app-react-outline",
|
||||||
|
|
||||||
"send-outline",
|
"send-outline",
|
||||||
|
|
||||||
"paper-stack",
|
"paper-stack",
|
||||||
|
|
||||||
"weather-cold",
|
"weather-cold",
|
||||||
|
|
||||||
"mobile-cross",
|
"mobile-cross",
|
||||||
|
|
||||||
"database-arrow-left",
|
"database-arrow-left",
|
||||||
|
|
||||||
"plus-circle-outline",
|
"plus-circle-outline",
|
||||||
|
|
||||||
"arrows-circle",
|
"arrows-circle",
|
||||||
|
|
||||||
"navicon",
|
"navicon",
|
||||||
|
|
||||||
"paper-fold-text",
|
"paper-fold-text",
|
||||||
|
|
||||||
"marketplace",
|
"marketplace",
|
||||||
|
|
||||||
"workflow",
|
"workflow",
|
||||||
|
|
||||||
"sankey-diagram",
|
"sankey-diagram",
|
||||||
|
|
||||||
"media-stack",
|
"media-stack",
|
||||||
|
|
||||||
"question-hexagon",
|
"question-hexagon",
|
||||||
|
|
||||||
"briefcase",
|
"briefcase",
|
||||||
|
|
||||||
"business-briefcase",
|
"business-briefcase",
|
||||||
|
|
||||||
"log",
|
"log",
|
||||||
|
|
||||||
"triangle-up",
|
"triangle-up",
|
||||||
|
|
||||||
"checkmark-circle",
|
"checkmark-circle",
|
||||||
|
|
||||||
"circle",
|
"circle",
|
||||||
|
|
||||||
"comment-swish",
|
"comment-swish",
|
||||||
|
|
||||||
"direct",
|
"direct",
|
||||||
|
|
||||||
"plus",
|
"plus",
|
||||||
|
|
||||||
"scuba",
|
"scuba",
|
||||||
|
|
||||||
"line-chart",
|
"line-chart",
|
||||||
|
|
||||||
"caution-circle",
|
"caution-circle",
|
||||||
|
|
||||||
"megaphone",
|
"megaphone",
|
||||||
|
|
||||||
"wireless",
|
"wireless",
|
||||||
|
|
||||||
"cup-outline",
|
"cup-outline",
|
||||||
|
|
||||||
"unicorn",
|
"unicorn",
|
||||||
|
|
||||||
"turtle",
|
"turtle",
|
||||||
|
|
||||||
"sushi",
|
"sushi",
|
||||||
|
|
||||||
"arrows-up-down",
|
"arrows-up-down",
|
||||||
|
|
||||||
"style-effects",
|
"style-effects",
|
||||||
|
|
||||||
"stopwatch",
|
"stopwatch",
|
||||||
|
|
||||||
"database",
|
"database",
|
||||||
|
|
||||||
"bar-chart",
|
"bar-chart",
|
||||||
|
|
||||||
"augmented-reality",
|
"augmented-reality",
|
||||||
|
|
||||||
"app-flash",
|
"app-flash",
|
||||||
|
|
||||||
"sample-lo",
|
"sample-lo",
|
||||||
|
|
||||||
"point",
|
"point",
|
||||||
|
|
||||||
"eye",
|
"eye",
|
||||||
|
|
||||||
"send",
|
"send",
|
||||||
|
|
||||||
"refresh-right",
|
"refresh-right",
|
||||||
|
|
||||||
"hourglass",
|
"hourglass",
|
||||||
|
|
||||||
"mobile-outline",
|
"mobile-outline",
|
||||||
|
|
||||||
"bookmark-outline",
|
"bookmark-outline",
|
||||||
|
|
||||||
"app-facebook-f-outline",
|
"app-facebook-f-outline",
|
||||||
|
|
||||||
"app-messenger-outline",
|
"app-messenger-outline",
|
||||||
|
|
||||||
"app-instagram-outline",
|
"app-instagram-outline",
|
||||||
|
|
||||||
"app-whatsapp-outline",
|
"app-whatsapp-outline",
|
||||||
|
|
||||||
"app-workplace-outline",
|
"app-workplace-outline",
|
||||||
|
|
||||||
"app-work-chat-outline",
|
"app-work-chat-outline",
|
||||||
|
|
||||||
"sample-hi",
|
"sample-hi",
|
||||||
|
|
||||||
"dog",
|
"dog",
|
||||||
|
|
||||||
"hub",
|
"hub",
|
||||||
|
|
||||||
"upload",
|
"upload",
|
||||||
|
|
||||||
"list-gear-outline",
|
"list-gear-outline",
|
||||||
|
|
||||||
"app-apple-outline",
|
"app-apple-outline",
|
||||||
|
|
||||||
"app-microsoft-windows",
|
"app-microsoft-windows",
|
||||||
|
|
||||||
"box-outline",
|
"box-outline",
|
||||||
|
|
||||||
"differential",
|
"differential",
|
||||||
|
|
||||||
"raincloud",
|
"raincloud",
|
||||||
|
|
||||||
"app-microsoft-windows-outline",
|
"app-microsoft-windows-outline",
|
||||||
|
|
||||||
"camcorder-live",
|
"camcorder-live",
|
||||||
|
|
||||||
"plumbing",
|
"plumbing",
|
||||||
|
|
||||||
"app-facebook-circle",
|
"app-facebook-circle",
|
||||||
|
|
||||||
"link",
|
"link",
|
||||||
|
|
||||||
"commercial-break-usd",
|
"commercial-break-usd",
|
||||||
|
|
||||||
"friends-engagement",
|
"friends-engagement",
|
||||||
|
|
||||||
"app-cms",
|
"app-cms",
|
||||||
|
|
||||||
"caution-triangle-outline",
|
"caution-triangle-outline",
|
||||||
|
|
||||||
"bird-flying",
|
"bird-flying",
|
||||||
|
|
||||||
"arrows-left-right",
|
"arrows-left-right",
|
||||||
|
|
||||||
"grid-9",
|
"grid-9",
|
||||||
|
|
||||||
"stethoscope",
|
"stethoscope",
|
||||||
|
|
||||||
"friend-except",
|
"friend-except",
|
||||||
|
|
||||||
"app-instagram",
|
"app-instagram",
|
||||||
|
|
||||||
"nav-magnifying-glass",
|
"nav-magnifying-glass",
|
||||||
|
|
||||||
"list-arrow-down",
|
"list-arrow-down",
|
||||||
|
|
||||||
"photo-arrows-left-right",
|
"photo-arrows-left-right",
|
||||||
|
|
||||||
"badge",
|
"badge",
|
||||||
|
|
||||||
"square-ruler",
|
"square-ruler",
|
||||||
|
|
||||||
"phone",
|
"phone",
|
||||||
|
|
||||||
"app-horizon-assets",
|
"app-horizon-assets",
|
||||||
|
|
||||||
"app-bloks",
|
"app-bloks",
|
||||||
|
|
||||||
"settings-internal",
|
"settings-internal",
|
||||||
|
|
||||||
"weather-thunder-outline",
|
"weather-thunder-outline",
|
||||||
"weather-thunder"
|
"weather-thunder"
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user