Skip to content

Commit

Permalink
feat: Use --no-git to skip git operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3xysteak committed Apr 2, 2024
1 parent df860d7 commit c0c01ec
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,34 @@ cli
.option(
'-m, --message <message>',
'Commit message. Use %s to replace the version number.',
{ default: '\"%s\"' },
)
.option(
'--git',
'Commit and tag the version. Always be opposite of --no-git.',
{ default: true },
)
.option(
'--no-git',
'Do not commit and tag the version. Always be opposite of --git.',
{ default: false },
)
.option(
'-t, --target <target>',
'The target version. Default is tauri version.',
)
.action((version, options) => {
try {
const { message = '%s' } = options
const {
message = '%s',
git,
} = options

const ver = tauriVersion(version)

if (!git)
return consola.success(ver)

const getPath = (path: string) => join(process.cwd(), path)
const pathList = [
'./package.json',
Expand Down

0 comments on commit c0c01ec

Please sign in to comment.