MCPcopy Index your code
hub / github.com/react/react / main

Function main

scripts/devtools/build-and-test.js:21–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19
20// This is the primary control function for this script.
21async function main() {
22 clear();
23
24 await confirm('Have you stopped all NPM DEV scripts?', () => {
25 const packagesPath = relative(process.cwd(), join(__dirname, 'packages'));
26
27 console.log('Stop all NPM DEV scripts in the following directories:');
28 console.log(
29 chalk.bold(' ' + join(packagesPath, 'react-devtools-core')),
30 chalk.gray('(start:backend, start:standalone)')
31 );
32 console.log(
33 chalk.bold(' ' + join(packagesPath, 'react-devtools-inline')),
34 chalk.gray('(start)')
35 );
36
37 const buildAndTestScriptPath = join(__dirname, 'build-and-test.js');
38 const pathToPrint = relative(process.cwd(), buildAndTestScriptPath);
39
40 console.log('\nThen restart this release step:');
41 console.log(chalk.bold.green(' ' + pathToPrint));
42 });
43
44 await confirm('Have you run the prepare-release script?', () => {
45 const prepareReleaseScriptPath = join(__dirname, 'prepare-release.js');
46 const pathToPrint = relative(process.cwd(), prepareReleaseScriptPath);
47
48 console.log('Begin by running the prepare-release script:');
49 console.log(chalk.bold.green(' ' + pathToPrint));
50 });
51
52 const archivePath = await archiveGitRevision();
53 const currentCommitHash = await downloadLatestReactBuild();
54
55 await buildAndTestInlinePackage();
56 await buildAndTestStandalonePackage();
57 await buildAndTestExtensions();
58
59 saveBuildMetadata({archivePath, currentCommitHash});
60
61 printFinalInstructions();
62}
63
64async function archiveGitRevision() {
65 const desktopPath = join(homedir(), 'Desktop');

Callers 1

build-and-test.jsFile · 0.70

Calls 9

archiveGitRevisionFunction · 0.85
downloadLatestReactBuildFunction · 0.85
buildAndTestExtensionsFunction · 0.85
saveBuildMetadataFunction · 0.85
clearFunction · 0.70
confirmFunction · 0.70
printFinalInstructionsFunction · 0.70

Tested by

no test coverage detected