Skip to content

Commit 006c856

Browse files
committed
report sdk version
1 parent 4710576 commit 006c856

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tasks.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ def start(context: Context, rebuild: bool = False) -> None:
146146
"""Start all containers (use --rebuild to force rebuild images)."""
147147
edition = "Enterprise" if INFRAHUB_ENTERPRISE else "Community"
148148

149+
# Get infrahub-sdk version
150+
try:
151+
import importlib.metadata
152+
sdk_version = importlib.metadata.version("infrahub-sdk")
153+
except Exception:
154+
sdk_version = "unknown"
155+
149156
# Build the compose command with optional service catalog profile
150157
compose_cmd = COMPOSE_COMMAND
151158
if INFRAHUB_SERVICE_CATALOG:
@@ -154,7 +161,8 @@ def start(context: Context, rebuild: bool = False) -> None:
154161
console.print()
155162
status_msg = (
156163
f"[green]Starting Infrahub {edition}[/green] [dim]({INFRAHUB_VERSION})[/dim]\n"
157-
f"[dim]Compose:[/dim] {COMPOSE_SOURCE}"
164+
f"[dim]Compose:[/dim] {COMPOSE_SOURCE}\n"
165+
f"[dim]Infrahub SDK:[/dim] {sdk_version}"
158166
)
159167
if INFRAHUB_SERVICE_CATALOG:
160168
status_msg += "\n[cyan]Service Catalog:[/cyan] Enabled"

0 commit comments

Comments
 (0)