Skip to content

Commit

Permalink
Merge pull request #1492 from NullVoxPopuli/automated-release
Browse files Browse the repository at this point in the history
Make release idempotent (+dry-run)
  • Loading branch information
NullVoxPopuli authored Jul 20, 2023
2 parents 2c0e2bd + 1d64986 commit 3fc3a4d
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 49 deletions.
44 changes: 13 additions & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test-packages/release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"fs-extra": "^10.0.0",
"globby": "^11.0.3",
"js-yaml": "^4.1.0",
"latest-version": "^5.0.0",
"semver": "^7.3.5",
"yargs": "^17.0.1"
},
Expand Down
15 changes: 10 additions & 5 deletions test-packages/release/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ yargs(process.argv.slice(2))
'publish',
`Publishes an already-prepared released by tagging, pushing tags, creating GitHub release, and publishing to NPM.`,
yargs =>
yargs.option('skipRepoSafetyCheck', {
type: 'boolean',
description:
'Allows you to run "publish" even if there are uncommited changes in your repo. Useful only for developing "publish" itself.',
}),
yargs
.option('skipRepoSafetyCheck', {
type: 'boolean',
description:
'Allows you to run "publish" even if there are uncommitted changes in your repo. Useful only for developing "publish" itself.',
})
.option('dryRun', {
type: 'boolean',
description: 'Run through the release, but log to stdout instead of tagging/pushing/publishing',
}),
async function (opts) {
await publish(opts);
}
Expand Down
Loading

0 comments on commit 3fc3a4d

Please sign in to comment.