1
0
mirror of synced 2026-03-22 10:28:36 +08:00

chore: release 1.0.0-rc.7

This commit is contained in:
roymondchen
2022-06-13 17:55:04 +08:00
committed by jia000
parent 2319df727a
commit 2ed4557536
19 changed files with 242 additions and 108 deletions

View File

@@ -29,6 +29,8 @@ const run = (bin, args, opts = {}) => execa(bin, args, { stdio: 'inherit', ...op
const dryRun = (bin, args, opts = {}) => console.log(chalk.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts);
const runIfNotDry = isDryRun ? dryRun : run;
const getPkgRoot = (pkg) => path.resolve(__dirname, `../packages/${pkg}`);
const getRunTimeRoot = (pkg) => path.resolve(__dirname, `../runtime/${pkg}`);
const getPlayground = () => path.resolve(__dirname, `../playground`);
const step = (msg) => console.log(chalk.cyan(msg));
async function main() {
@@ -97,13 +99,13 @@ async function main() {
// update pnpm-lock.yaml
step('\nUpdating lockfile...');
await run(`pnpm`, ['install', '--prefer-offline']);
await run(`pnpm`, ['reinstall']);
const { stdout } = await run('git', ['diff'], { stdio: 'pipe' });
if (stdout) {
step('\nCommitting changes...');
await runIfNotDry('git', ['add', '-A']);
// await runIfNotDry('git', ['commit', '-m', `chore: release v${targetVersion}`]);
await runIfNotDry('git', ['commit', '-m', `chore: release v${targetVersion}`]);
} else {
console.log('No changes to commit.');
}
@@ -136,6 +138,8 @@ function updateVersions(version) {
updatePackage(path.resolve(__dirname, '..'), version);
// 2. update all packages
packages.forEach((p) => updatePackage(getPkgRoot(p), version));
['vue3', 'react', 'vue2'].forEach((p) => updatePackage(getRunTimeRoot(p), version));
updatePackage(getPlayground(), version);
}
function updatePackage(pkgRoot, version) {