mirror of
https://github.com/facebook/react.git
synced 2026-02-26 04:45:02 +00:00
* Migrate prepare-release-from-ci to new workflow I added a `--releaseChannel (-r)` argument to script. You must choose either "stable" or "experimental", because every build job now includes both channels. The prepare-release-from-npm script is unchanged since those releases are downloaded from npm, nt CI. (As a side note, I think we should start preparing semver releases using the prepare-release-from-ci script, too, and get rid of prepare-release-from-npm. I think that was a neat idea originally but because we already run `npm pack` before storing the artifacts in CI, there's really not much additional safety; the only safeguard it adds is the requirement that a "next" release must have already been published.) * Move validation to parse-params module
40 lines
1.2 KiB
JavaScript
Executable File
40 lines
1.2 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
const {join} = require('path');
|
|
const {handleError} = require('./utils');
|
|
|
|
const checkEnvironmentVariables = require('./shared-commands/check-environment-variables');
|
|
const downloadBuildArtifacts = require('./shared-commands/download-build-artifacts');
|
|
const getLatestMasterBuildNumber = require('./shared-commands/get-latest-master-build-number');
|
|
const parseParams = require('./shared-commands/parse-params');
|
|
const printPrereleaseSummary = require('./shared-commands/print-prerelease-summary');
|
|
const testPackagingFixture = require('./shared-commands/test-packaging-fixture');
|
|
const testTracingFixture = require('./shared-commands/test-tracing-fixture');
|
|
|
|
const run = async () => {
|
|
try {
|
|
const params = parseParams();
|
|
params.cwd = join(__dirname, '..', '..');
|
|
|
|
if (!params.build) {
|
|
params.build = await getLatestMasterBuildNumber(false);
|
|
}
|
|
|
|
await checkEnvironmentVariables(params);
|
|
await downloadBuildArtifacts(params);
|
|
|
|
if (!params.skipTests) {
|
|
await testPackagingFixture(params);
|
|
await testTracingFixture(params);
|
|
}
|
|
|
|
await printPrereleaseSummary(params, false);
|
|
} catch (error) {
|
|
handleError(error);
|
|
}
|
|
};
|
|
|
|
run();
|