Skip to content

Commit

Permalink
build: release script
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 29, 2023
1 parent 1926045 commit 3da3b69
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions scripts/release.mjs
Expand Up @@ -178,6 +178,16 @@ async function main() {
step('\nUpdating versions in package.json files...')
await updateVersions(pkgWithVersions)

step('\nCopying README for router package...')
if (!isDryRun) {
await fs.copyFile(
resolve(__dirname, '../README.md'),
resolve(__dirname, '../packages/router/README.md')
)
} else {
console.log(`(skipped)`)
}

step('\nGenerating changelogs...')
for (const pkg of pkgWithVersions) {
step(` -> ${pkg.name} (${pkg.path})`)
Expand Down Expand Up @@ -209,23 +219,11 @@ async function main() {
console.log(`(skipped)`)
}

step('\nCopying README...')
if (!isDryRun) {
await fs.copyFile(
resolve(__dirname, '../README.md'),
resolve(__dirname, 'README.md')
)
} else {
console.log(`(skipped)`)
}

const { stdout } = await run('git', ['diff'], { stdio: 'pipe' })
if (stdout) {
step('\nCommitting changes...')
await runIfNotDry('git', [
'add',
'packages/*/README.md',
'packages/*/LICENSE',
'packages/*/CHANGELOG.md',
'packages/*/package.json',
])
Expand Down

0 comments on commit 3da3b69

Please sign in to comment.