mirror of
https://github.com/facebook/react.git
synced 2026-02-23 20:23:02 +00:00
Unforks these scripts now that we are fully migrated to GH.
ghstack-source-id: e1e15452f2
Pull Request resolved: https://github.com/facebook/react/pull/30506
39 lines
1014 B
JavaScript
Executable File
39 lines
1014 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
const {join} = require('path');
|
|
const {addDefaultParamValue, handleError} = require('./utils');
|
|
|
|
const {
|
|
downloadBuildArtifacts,
|
|
} = require('./shared-commands/download-build-artifacts');
|
|
const parseParams = require('./shared-commands/parse-params');
|
|
const printPrereleaseSummary = require('./shared-commands/print-prerelease-summary');
|
|
const testPackagingFixture = require('./shared-commands/test-packaging-fixture');
|
|
|
|
const run = async () => {
|
|
try {
|
|
addDefaultParamValue(null, '--commit', 'main');
|
|
|
|
const params = await parseParams();
|
|
params.cwd = join(__dirname, '..', '..');
|
|
|
|
await downloadBuildArtifacts(
|
|
params.commit,
|
|
params.releaseChannel ?? process.env.RELEASE_CHANNEL
|
|
);
|
|
|
|
if (!params.skipTests) {
|
|
await testPackagingFixture(params);
|
|
}
|
|
|
|
const isLatestRelease = params.releaseChannel === 'latest';
|
|
await printPrereleaseSummary(params, isLatestRelease);
|
|
} catch (error) {
|
|
handleError(error);
|
|
}
|
|
};
|
|
|
|
run();
|