2022-05-17 09:58:19 +00:00
|
|
|
# No relative imports allowed in this file to be able to run server_setup.py without packages
|
|
|
|
|
|
|
|
import sys
|
2022-05-08 15:29:45 +00:00
|
|
|
from pathlib import Path
|
|
|
|
|
2022-05-17 10:09:54 +00:00
|
|
|
sys.path.insert(0, str(Path(__file__).parent.parent.absolute()))
|
2022-05-17 09:58:19 +00:00
|
|
|
from terminal_utils import run
|
2022-05-08 15:29:45 +00:00
|
|
|
|
|
|
|
LOCAL_BIN = Path("/home/admin/.local/bin/")
|
|
|
|
LOGS_DIR = Path("/var/log/advlabdb")
|
2022-05-09 16:03:25 +00:00
|
|
|
REPO_DIR = Path("/home/admin/advlabdb")
|
2022-05-08 15:29:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
def install_latest_pipx():
|
|
|
|
run("pip install --user --upgrade pipx")
|
|
|
|
|
|
|
|
|
|
|
|
def poetry_update():
|
|
|
|
poetry_bin = LOCAL_BIN / "poetry"
|
2022-05-09 16:03:25 +00:00
|
|
|
run(f"{poetry_bin} update", cwd=REPO_DIR)
|