2026-08-09 22:41:26 +02:00
|
|
|
# Repo Manager — local developer targets (RMGR-ADR-001)
|
|
|
|
|
UV ?= $(shell command -v uv 2>/dev/null || if [ -x "$$HOME/.local/bin/uv" ]; then printf "%s" "$$HOME/.local/bin/uv"; else printf "%s" "uv"; fi)
|
|
|
|
|
|
2026-09-01 01:39:39 +02:00
|
|
|
.PHONY: help install test lint cli-version publisher-run publisher-snapshot container-build
|
|
|
|
|
|
|
|
|
|
IMAGE_REPOSITORY ?= forgejo.coulomb.social/coulomb/repo-manager
|
|
|
|
|
IMAGE_TAG ?= dev
|
2026-08-09 22:41:26 +02:00
|
|
|
|
|
|
|
|
help:
|
|
|
|
|
@echo "Repo Manager targets:"
|
|
|
|
|
@echo " make install # uv sync / editable install"
|
|
|
|
|
@echo " make test # pytest"
|
|
|
|
|
@echo " make cli-version # rmgr --version"
|
2026-09-01 00:48:32 +02:00
|
|
|
@echo " make publisher-run # serve the read-only port.repo publisher"
|
|
|
|
|
@echo " make publisher-snapshot REGISTRY=... CURSOR_SECRET=..."
|
2026-09-01 01:39:39 +02:00
|
|
|
@echo " make container-build IMAGE_TAG=... # build publisher image"
|
2026-08-09 22:41:26 +02:00
|
|
|
@echo " (api/db/migrate land with first runtime slice)"
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
$(UV) sync --all-extras 2>/dev/null || $(UV) pip install -e ".[dev]"
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
$(UV) run pytest -q
|
|
|
|
|
|
|
|
|
|
lint:
|
|
|
|
|
$(UV) run ruff check src tests 2>/dev/null || true
|
|
|
|
|
|
|
|
|
|
cli-version:
|
|
|
|
|
$(UV) run rmgr --version
|
2026-09-01 00:48:32 +02:00
|
|
|
|
|
|
|
|
publisher-run:
|
|
|
|
|
$(UV) run rmgr publisher api --host $${HOST:-127.0.0.1} --port $${PORT:-8020}
|
|
|
|
|
|
|
|
|
|
publisher-snapshot:
|
|
|
|
|
@test -n "$(REGISTRY)" && test -n "$(CURSOR_SECRET)"
|
|
|
|
|
$(UV) run rmgr publisher snapshot --registry "$(REGISTRY)" --cursor-secret "$(CURSOR_SECRET)"
|
2026-09-01 01:39:39 +02:00
|
|
|
|
|
|
|
|
container-build:
|
|
|
|
|
docker build -f Containerfile \
|
|
|
|
|
--build-arg VERSION=0.1.0 \
|
|
|
|
|
--build-arg VCS_REF=$$(git rev-parse HEAD) \
|
|
|
|
|
-t $(IMAGE_REPOSITORY):$(IMAGE_TAG) .
|