Skip to content

Commit b010678

Browse files
committed
refactor(cli): add argument for version command
73
1 parent 12975a5 commit b010678

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

commitizen/cli.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,25 @@
116116
},
117117
{
118118
"name": ["version"],
119-
"help": "get the version of the installed commitizen",
119+
"help": (
120+
"get the version of the installed commitizen or the current project"
121+
" (default: installed commitizen)"
122+
),
120123
"func": commands.Version,
124+
"arguments": [
125+
{
126+
"name": ["-p", "--project"],
127+
"help": "get the version of the current project",
128+
"action": "store_true",
129+
"exclusive_group": "group1",
130+
},
131+
{
132+
"name": ["-c", "--commitizen"],
133+
"help": "get the version of the installed commitizen",
134+
"action": "store_true",
135+
"exclusive_group": "group1",
136+
},
137+
],
121138
},
122139
{
123140
"name": ["check"],

0 commit comments

Comments
 (0)