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

30 lines
581 B
Python
Raw Normal View History

2022-05-03 17:02:39 +00:00
#!/usr/bin/env python3
import sys
2022-05-07 14:02:07 +00:00
from datetime import datetime
2022-05-03 17:02:39 +00:00
from pathlib import Path
script_dir = Path(__file__).parent.absolute()
sys.path.insert(0, str(script_dir))
2022-05-07 15:01:05 +00:00
from shared import box, install_latest_pipx, local_bin, poetry_update, run, spaced_hl
2022-05-03 17:02:39 +00:00
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")
2022-05-07 15:01:05 +00:00
poetry_update(script_dir)