Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/fastapi_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
def version_callback(value: bool) -> None:
if value:
print(f"FastAPI CLI version: [green]{__version__}[/green]")
try:
from fastapi_cloud_cli import (
__version__ as cloud_cli_version,
)

print(f"FastAPI Cloud CLI version: [green]{cloud_cli_version}[/green]")
except ImportError: # pragma: no cover
pass

raise typer.Exit()


Expand Down
1 change: 1 addition & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ def test_version() -> None:
result = runner.invoke(app, ["--version"])
assert result.exit_code == 0, result.output
assert "FastAPI CLI version:" in result.output
assert "FastAPI Cloud CLI version:" in result.output


def test_dev_reload_dir() -> None:
Expand Down
Loading