1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-08 21:21:06 +00:00
AdvLabDB/advlabdb/scripts/maintain/user_update.py

27 lines
621 B
Python

from ..setup.shared import LOCAL_BIN, REPO_DIR, install_latest_pipx, poetry_update
from ..terminal_utils import box, run
from .shared import show_update_datetime
def main():
show_update_datetime()
box("Upgrade pipx")
install_latest_pipx()
box("Upgrade pipx packages")
pipx_bin = LOCAL_BIN / "pipx"
run(f"{pipx_bin} upgrade-all --include-injected")
box("Backup database")
# TODO: Backup
box("Pull updates from the git repository")
run("git pull origin main", cwd=REPO_DIR)
box("Install latest Poetry packages")
poetry_update()
if __name__ == "__main__":
main()