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

30 lines
674 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("Update user docs")
# TODO: Update docs
box("Install latest Poetry packages")
poetry_update()
if __name__ == "__main__":
main()