1 import asyncio

2

3 import structlog

4 import typer

5

6 from meshadmin.cli.utils import perform_self_upgrade

7

8 system_app = typer.Typer(no_args_is_help=True)

9 logger = structlog.get_logger(__name__)

10

11

12@system_app.command(name="upgrade")

13 def upgrade_command():

14 logger.info("Starting manual meshadmin upgrade")

15 result = asyncio.run(perform_self_upgrade())

16 if not result:

17 raise typer.Exit(code=1)

18 logger.info("Manual meshadmin upgrade completed successfully")