infra!: made app runner-agnostic (poetry/uv) and optimized build process

This commit is contained in:
2025-12-21 05:27:13 +01:00
parent 365f110f9c
commit ffd2678c91
4 changed files with 46 additions and 41 deletions

View File

@@ -4,7 +4,8 @@
# --- SETTINGS ---
# Change to 'uv' when ready.
RUNNER = poetry
RUNNER ?= poetry
export RUNNER
# --- VARIABLES ---
CORE_DIR = brain
@@ -19,7 +20,7 @@ INSTALL_CMD = $(if $(filter uv,$(RUNNER)),sync,install)
ARGS = $(filter-out $@,$(MAKECMDGOALS))
BUMP_CMD = cd $(CORE_DIR) && $(RUNNER) run bump-my-version bump
COMPOSE_CMD = docker-compose
DOCKER_CMD = cd $(CORE_DIR) && docker build -t $(IMAGE_NAME):latest .
DOCKER_CMD = cd $(CORE_DIR) && docker build --build-arg RUNNER=$(RUNNER) -t $(IMAGE_NAME):latest .
RUNNER_ADD = cd $(CORE_DIR) && $(RUNNER) add
RUNNER_HOOKS = cd $(CORE_DIR) && $(RUNNER) run pre-commit install -c ../.pre-commit-config.yaml
@@ -195,7 +196,7 @@ shell: check-docker
test: check-runner
@echo "$(T)🧪 Running tests...$(R)"
$(RUNNER_RUN) pytest $(ARGS)
$(RUNNER_RUN) pytest -n auto --dist=loadscope $(ARGS)
up: check-docker
@echo "$(T)🚀 Starting Agent Media...$(R)"