mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52829 Changelog: [internal] Just a small refactor to move the definitions of output paths to a specific module. We'll add more to this in a latter diff. Reviewed By: sammy-SC Differential Revision: D78905645 fbshipit-source-id: 011e6cec13396301dad8e76400b6f2b9e13568f0
30 lines
843 B
JavaScript
30 lines
843 B
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 strict-local
|
|
* @format
|
|
*/
|
|
|
|
import path from 'path';
|
|
|
|
export const OUTPUT_PATH: string = path.resolve(__dirname, '..', '.out');
|
|
export const JS_BUILD_OUTPUT_PATH: string = path.join(OUTPUT_PATH, 'js-builds');
|
|
export const NATIVE_BUILD_OUTPUT_PATH: string = path.join(
|
|
OUTPUT_PATH,
|
|
'native-builds',
|
|
);
|
|
|
|
export function getTestBuildOutputPath(): string {
|
|
const fantomRunID = process.env.__FANTOM_RUN_ID__;
|
|
if (fantomRunID == null) {
|
|
throw new Error(
|
|
'Expected Fantom run ID to be set by global setup, but it was not (process.env.__FANTOM_RUN_ID__ is null)',
|
|
);
|
|
}
|
|
|
|
return path.join(JS_BUILD_OUTPUT_PATH, fantomRunID);
|
|
}
|