()
| 19 | |
| 20 | // This is the primary control function for this script. |
| 21 | async 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 | |
| 64 | async function archiveGitRevision() { |
| 65 | const desktopPath = join(homedir(), 'Desktop'); |
no test coverage detected