Skip to content

Commit 60ee491

Browse files
committed
feat: add version flag
1 parent 1deb449 commit 60ee491

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# CHANGELOG
22

3-
## v5.0.2 (2023-08-24)
3+
## v5.1.0 (2023-08-24)
44

5+
- Adds `--version` CLI flag
56
- Bumps dependencies
67

78
## v5.0.1 (2023-06-29)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Options:
6868
--disable_descriptions
6969
Disables descriptions in messages.
7070
--quiet Does not output when there is nothing to bug about.
71+
--version show program's version number and exit
7172
```
7273

7374
## Development

pullbug/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '5.0.2'
1+
__version__ = '5.1.0'

pullbug/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
from typing import get_args
44

5+
from pullbug._version import __version__
56
from pullbug.bug import (
67
DEFAULT_BASE_URL,
78
DEFAULT_LOG_LEVEL,
@@ -160,6 +161,11 @@ def __init__(self):
160161
default=False,
161162
help='Does not output when there is nothing to bug about.',
162163
)
164+
parser.add_argument(
165+
'--version',
166+
action='version',
167+
version=f'%(prog)s {__version__}',
168+
)
163169
parser.parse_args(namespace=self)
164170

165171
def run(self):

0 commit comments

Comments
 (0)