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