Skip to content

Commit

Permalink
fix: remove the useless option 'version' (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
noootwo authored Nov 4, 2024
1 parent 5675e6e commit 41f0c38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 3 additions & 8 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { VersionBumpProgress } from '../types/version-bump-progress'
import process from 'node:process'
import symbols from 'log-symbols'
import * as ezSpawn from '@jsdevtools/ez-spawn'
import { version as packageVersion } from '../../package.json'
import symbols from 'log-symbols'
import { ProgressEvent } from '../types/version-bump-progress'
import { versionBump } from '../version-bump'
import { ExitCode } from './exit-code'
Expand All @@ -20,12 +19,8 @@ export async function main(): Promise<void> {
// Parse the command-line arguments
const { help, version, quiet, options } = await parseArgs()

if (help) {
process.exit(ExitCode.Success)
}
else if (version) {
// Show the version number and exit
console.log(packageVersion)
if (help || version) {
// Will be handled by cac, just need to exit
process.exit(ExitCode.Success)
}
else {
Expand Down
1 change: 0 additions & 1 deletion src/cli/parse-args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export function loadCliArgs(argv = process.argv) {
.option('--no-verify', 'Skip git verification')
.option('--ignore-scripts', `Ignore scripts (default: ${bumpConfigDefaults.ignoreScripts})`)
.option('-q, --quiet', 'Quiet mode')
.option('-v, --version <version>', 'Target version')
.option('--current-version <version>', 'Current version')
.option('--print-commits', 'Print recent commits')
.option('-x, --execute <command>', 'Commands to execute after version bumps')
Expand Down

0 comments on commit 41f0c38

Please # to comment.