2022-05-09 16:03:25 +00:00
|
|
|
from ..setup.shared import LOCAL_BIN, REPO_DIR, install_latest_pipx, poetry_update
|
2022-05-08 19:26:25 +00:00
|
|
|
from ..terminal_utils import box, run
|
|
|
|
from .shared import show_update_datetime
|
2022-05-08 15:29:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
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")
|
|
|
|
|
2022-05-09 16:03:25 +00:00
|
|
|
box("Backup database")
|
2022-05-08 15:29:45 +00:00
|
|
|
# TODO: Backup
|
|
|
|
|
2022-05-09 16:03:25 +00:00
|
|
|
box("Pull updates from the git repository")
|
2022-05-09 23:28:57 +00:00
|
|
|
run("git pull origin main", cwd=REPO_DIR)
|
2022-05-09 16:03:25 +00:00
|
|
|
|
|
|
|
box("Update user docs")
|
|
|
|
# TODO: Update docs
|
|
|
|
|
2022-05-08 15:29:45 +00:00
|
|
|
box("Install latest Poetry packages")
|
|
|
|
poetry_update()
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|