mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
ADD REPO_DIR constant
This commit is contained in:
parent
ce948188c6
commit
ff8ef36615
2 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
from ..setup.shared import LOCAL_BIN, install_latest_pipx, poetry_update
|
||||
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
|
||||
|
||||
|
@ -13,8 +13,15 @@ def main():
|
|||
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", cwd=REPO_DIR)
|
||||
|
||||
box("Update user docs")
|
||||
# TODO: Update docs
|
||||
|
||||
box("Install latest Poetry packages")
|
||||
poetry_update()
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from pathlib import Path
|
||||
|
||||
from ... import __file__ as advlabdb_init_path # Points to __init__.py
|
||||
from ..terminal_utils import run
|
||||
|
||||
LOCAL_BIN = Path("/home/admin/.local/bin/")
|
||||
LOGS_DIR = Path("/var/log/advlabdb")
|
||||
REPO_DIR = Path("/home/admin/advlabdb")
|
||||
|
||||
|
||||
def install_latest_pipx():
|
||||
|
@ -13,5 +13,4 @@ def install_latest_pipx():
|
|||
|
||||
def poetry_update():
|
||||
poetry_bin = LOCAL_BIN / "poetry"
|
||||
advlabdb_root_dir = Path(advlabdb_init_path).parents[1]
|
||||
run(f"{poetry_bin} update", cwd=advlabdb_root_dir)
|
||||
run(f"{poetry_bin} update", cwd=REPO_DIR)
|
||||
|
|
Loading…
Reference in a new issue