Refactor: Replace version.sh with version.py

This commit is contained in:
Whispering Wind
2025-03-11 11:04:35 +03:30
committed by GitHub
parent 02b276ac8e
commit 85c6a3116c
3 changed files with 77 additions and 60 deletions

View File

@ -502,15 +502,14 @@ def get_services_status() -> dict[str, bool] | None:
if res := run_cmd(['bash', Command.SERVICES_STATUS.value]):
return json.loads(res)
def show_version() -> str | None:
"""Displays the currently installed version of the panel."""
return run_cmd(['bash', Command.VERSION.value, 'show-version'])
return run_cmd(['python3', Command.VERSION.value, 'show-version'])
def check_version() -> str | None:
"""Checks if the current version is up-to-date and displays changelog if not."""
return run_cmd(['bash', Command.VERSION.value, 'check-version'])
return run_cmd(['python3', Command.VERSION.value, 'check-version'])
# endregion
# endregion