Skip to content

Commit 312a214

Browse files
authoredAug 19, 2023
feat: add no commit and tag (#12)
1 parent 884cf4c commit 312a214

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/cli/parse-args.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export async function parseArgs(): Promise<ParsedArgs> {
3030
.option('--preid <preid>', 'ID for prerelease')
3131
.option('--all', `Include all files (default: ${bumpConfigDefaults.all})`)
3232
.option('-c, --commit [msg]', `Commit message (default: ${bumpConfigDefaults.commit})`)
33+
.option('--no-commit', 'Skip commit')
3334
.option('-t, --tag [tag]', `Tag name (default: ${bumpConfigDefaults.tag})`)
35+
.option('--no-tag', 'Skip tag')
3436
.option('-p, --push', `Push to remote (default: ${bumpConfigDefaults.push})`)
3537
.option('-y, --yes', `Skip confirmation (default: ${!bumpConfigDefaults.confirm})`)
3638
.option('-r, --recursive', `Bump package.json files recursively (default: ${bumpConfigDefaults.recursive})`)
@@ -50,8 +52,8 @@ export async function parseArgs(): Promise<ParsedArgs> {
5052
quiet: args.quiet as boolean,
5153
options: await loadBumpConfig({
5254
preid: args.preid,
53-
commit: args.commit,
54-
tag: args.tag,
55+
commit: !args.noCommit && args.commit,
56+
tag: !args.noTag && args.tag,
5557
push: args.push,
5658
all: args.all,
5759
confirm: !args.yes,

0 commit comments

Comments
 (0)
Please sign in to comment.