Skip to content

Commit

Permalink
feat(cli): add version_option
Browse files Browse the repository at this point in the history
  • Loading branch information
rgeraskin committed Apr 9, 2024
1 parent 8843434 commit b2ff73f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dump_psql_roles_grants/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
This module contains only the version of the package.
"""

__version__ = "0.2.3"
2 changes: 2 additions & 0 deletions dump_psql_roles_grants/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import click

from dump_psql_roles_grants.__version__ import __version__
from dump_psql_roles_grants.classes import Ignores
from dump_psql_roles_grants.config import load_config
from dump_psql_roles_grants.get_data import get_data_from_psql
Expand All @@ -12,6 +13,7 @@


@click.group()
@click.version_option(__version__)
# @click.option("-v", "--verbose", count=True)
def cli():
"""Dump Postgres Roles and Grants"""
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ tag_format = "$version"
version_scheme = "pep440"
version_provider = "poetry"
update_changelog_on_bump = true
version_files = [
"dump_psql_roles_grants/__version__.py",
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit b2ff73f

Please sign in to comment.