Files
react-native/scripts/releases/prepare-ios-prebuilds.js
Tim YungandFacebook GitHub Bot 84de8a075e RN: Delete @oncall Annotations (#51416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51416

Deletes `oncall` annotations from the `facebook/react-native` repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74902524

fbshipit-source-id: 32a6a5b2ff27281792d572f151e2b094d9a79029
2025-05-17 16:18:05 -07:00

79 lines
1.9 KiB
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
const {buildDepenencies} = require('./ios-prebuild/build');
const {getCLIConfiguration} = require('./ios-prebuild/cli');
const {createFramework} = require('./ios-prebuild/compose-framework');
const {cleanFolder} = require('./ios-prebuild/folders');
const {setupDependencies} = require('./ios-prebuild/setupDependencies');
const {createSwiftPackageFile} = require('./ios-prebuild/swift-package');
const path = require('path');
require('../babel-register').registerForScript();
const THIRD_PARTY_PATH = 'packages/react-native/third-party';
const BUILD_DESTINATION = '.build';
const SCHEME = 'ReactNativeDependencies';
/**
* Main entry point
*/
async function main() {
const cli = await getCLIConfiguration();
if (cli == null) {
return 0;
}
const buildFolder = path.resolve(THIRD_PARTY_PATH, BUILD_DESTINATION);
const rootFolder = path.resolve(THIRD_PARTY_PATH);
if (cli.tasks.setup) {
await cleanFolder(rootFolder);
await setupDependencies(cli.dependencies, rootFolder);
}
if (cli.tasks.swiftpackage) {
// Create Package.swift file
await createSwiftPackageFile(SCHEME, cli.dependencies, rootFolder);
}
if (cli.tasks.build) {
await cleanFolder(buildFolder);
await buildDepenencies(
SCHEME,
cli.configuration,
cli.dependencies,
cli.destinations,
rootFolder,
buildFolder,
);
}
if (cli.tasks.compose) {
await createFramework(
SCHEME,
cli.configuration,
cli.dependencies,
rootFolder,
buildFolder,
cli.identity,
);
}
console.log('');
console.log('🏁 Done!');
}
if (require.main === module) {
// eslint-disable-next-line no-void
void main();
}