add dtc subcommand version #31
1 changed files with 15 additions and 0 deletions
15
dump_things_pyclient/commands/dtc_plugins/version.py
Normal file
15
dump_things_pyclient/commands/dtc_plugins/version.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
import importlib.metadata
|
||||
import rich_click as click
|
||||
from rich import print as rprint
|
||||
|
||||
|
||||
subcommand_name = 'version'
|
||||
|
||||
|
||||
@click.command(short_help='Show the version of `dtc`')
|
||||
def cli():
|
||||
"""Show the version of `dtc` and exit
|
||||
"""
|
||||
rprint(importlib.metadata.version('dump-things-pyclient'))
|
||||
return 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue