Skip to content

Commit

Permalink
build: help [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Apr 17, 2024
1 parent 93d1302 commit 84810b9
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ let {
noDepsUpdate,
} = args

if (args.h || args.help) {
console.log(
`
Usage: node release.mjs [flags]
node release.mjs [ -h | --help ]
Flags:
--skipBuild Skip building packages
--tag Publish under a given npm dist tag
--dry Dry run
--skipCleanCheck Skip checking if the git repo is clean
--noDepsUpdate Skip updating dependencies in package.json files
`.trim()
)
process.exit(0)
}

// const preId =
// args.preid ||
// (semver.prerelease(currentVersion) && semver.prerelease(currentVersion)[0])
Expand Down Expand Up @@ -264,14 +281,14 @@ async function updateVersions(packageList) {
if (!noDepsUpdate) {
updateDeps(pkg, 'dependencies', packageList)
updateDeps(pkg, 'peerDependencies', packageList)
const content = JSON.stringify(pkg, null, 2) + '\n'
return isDryRun
? dryRun('write', [name], {
dependencies: pkg.dependencies,
peerDependencies: pkg.peerDependencies,
})
: fs.writeFile(join(path, 'package.json'), content)
}
const content = JSON.stringify(pkg, null, 2) + '\n'
return isDryRun
? dryRun('write', [name], {
dependencies: pkg.dependencies,
peerDependencies: pkg.peerDependencies,
})
: fs.writeFile(join(path, 'package.json'), content)
})
)
}
Expand Down

0 comments on commit 84810b9

Please sign in to comment.