feat: Add 'doctor' and 'sync' Makefile targets

This commit is contained in:
Matteo Cherubini 2026-05-09 17:03:16 +02:00
parent ddd86fd5d5
commit 3a2d69619c

View file

@ -15,6 +15,8 @@ help:
@echo " make status - Check submodule and encryption status"
@echo " make lint - Verify schema, privacy flags, and metadata"
@echo " make lock - Lock all encrypted files across all genomes"
@echo " make doctor - Verify all required tools are installed"
@echo " make sync - Sync submodules and report unpushed commits"
lint:
@bash scripts/lint-genomes.sh
@ -36,6 +38,21 @@ status:
@echo "--- Encryption Status (First 10 files) ---"
@git-crypt status | head -n 10
doctor:
@echo "Checking required tools..."
@command -v git >/dev/null 2>&1 || { echo " MISSING: git"; exit 1; }
@command -v git-crypt >/dev/null 2>&1 || { echo " MISSING: git-crypt"; exit 1; }
@command -v curl >/dev/null 2>&1 || { echo " MISSING: curl"; exit 1; }
@command -v jq >/dev/null 2>&1 || { echo " MISSING: jq"; exit 1; }
@command -v bw >/dev/null 2>&1 || echo " OPTIONAL: bw (Bitwarden CLI) not found — key injection will be manual."
@echo "System ready."
sync:
@echo "Syncing submodules..."
@git submodule update --init --recursive
@echo "--- Unpushed commits per genome ---"
@git submodule foreach 'git log --oneline @{u}.. 2>/dev/null | head -5 || true'
lock:
@echo "Locking master repository..."
@git-crypt lock 2>/dev/null || true