Skip to content

Commit

Permalink
feat(cli): add version subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
fyhertz committed Jul 18, 2024
1 parent acdf35c commit 4f69586
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
poetry install --extras pyinstaller
poetry run poetry-dynamic-versioning
poetry run pyinstaller --onefile src/wheel2deb/__main__.py --name wheel2deb -s
dist/wheel2deb version
dist/wheel2deb
mv dist/wheel2deb wheel2deb_linux_amd64
Expand Down
6 changes: 6 additions & 0 deletions src/wheel2deb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from wheel2deb.context import load_configuration
from wheel2deb.debian import convert_wheels
from wheel2deb.logger import enable_debug
from wheel2deb.version import __version__

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -192,5 +193,10 @@ def build(
build_all_packages(output_directory, workers_count, force_build)


@app.command(help="Output wheel2deb version.")
def version() -> None:
typer.echo(__version__)


def main() -> None:
app()

0 comments on commit 4f69586

Please sign in to comment.