mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Updates the release script to publish tags as well as take a `--ci` option Test plan: ``` $ yarn npm:publish --debug --frfr yarn run v1.22.22 $ node scripts/release/publish --debug --frfr ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck NPM 2-factor auth code: ****** ✔ Wrote package.json for [email protected] ========== babel-plugin-react-compiler ========== ⠧ Publishing [email protected] to npm + [email protected] ✔ Successfully published babel-plugin-react-compiler to npm ℹ dry-run: npm dist-tag add [email protected] experimental --otp=****** ✔ Successfully pushed dist-tag experimental for babel-plugin-react-compiler to npm ✔ Wrote package.json for [email protected] ========== eslint-plugin-react-compiler ========== ⠹ Publishing [email protected] to npm + [email protected] ✔ Successfully published eslint-plugin-react-compiler to npm ℹ dry-run: npm dist-tag add [email protected] experimental --otp=****** ✔ Successfully pushed dist-tag experimental for eslint-plugin-react-compiler to npm ✔ Wrote package.json for [email protected] ========== react-compiler-healthcheck ========== ⠙ Publishing [email protected] to npm + [email protected] ✔ Successfully published react-compiler-healthcheck to npm ℹ dry-run: npm dist-tag add [email protected] experimental --otp=****** ✔ Successfully pushed dist-tag experimental for react-compiler-healthcheck to npm ✅ All done ✨ Done in 50.64s. ``` ghstack-source-id: 405cc001c2ab2adaad2bfe4f11fdb7fd28d7e2d1 Pull Request resolved: https://github.com/facebook/react/pull/30614
23 lines
535 B
JavaScript
23 lines
535 B
JavaScript
const ora = require('ora');
|
|
const {execHelper} = require('./utils');
|
|
|
|
async function buildPackages(pkgNames) {
|
|
const spinner = ora(`Building packages`).info();
|
|
for (const pkgName of pkgNames) {
|
|
const command = `yarn workspace ${pkgName} run build`;
|
|
spinner.start(`Running: ${command}\n`);
|
|
try {
|
|
await execHelper(command);
|
|
} catch (e) {
|
|
spinner.fail(e.toString());
|
|
throw e;
|
|
}
|
|
spinner.succeed(`Successfully built ${pkgName}`);
|
|
}
|
|
spinner.stop();
|
|
}
|
|
|
|
module.exports = {
|
|
buildPackages,
|
|
};
|