1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-12 21:40:41 +00:00
AdvLabDB/scripts/user_update.py

29 lines
581 B
Python

#!/usr/bin/env python3
import sys
from datetime import datetime
from pathlib import Path
script_dir = Path(__file__).parent.absolute()
sys.path.insert(0, str(script_dir))
from shared import box, install_latest_pipx, local_bin, poetry_update, run, spaced_hl
spaced_hl()
dt = datetime.now().strftime("%d.%m.%Y %H:%M:%S")
box(dt, "Update on")
box("Upgrade pipx")
install_latest_pipx()
box("Upgrade pipx packages")
pipx_bin = local_bin / "pipx"
run(f"{pipx_bin} upgrade-all --include-injected")
# TODO: Backup
box("Install latest Poetry packages")
poetry_update(script_dir)