# Makefile for HoneyDue KMM — wraps the long-form commands you actually
# use every day. If you find yourself copy/pasting a command twice, it
# belongs here.
#
# Quick reference
# ---------------
#   make verify-snapshots     # fast; run on every PR, CI runs this
#   make record-snapshots     # slow; regenerate baselines after UI change
#   make optimize-goldens     # rarely needed — record-snapshots runs this
#
.PHONY: help record-snapshots verify-snapshots optimize-goldens \
        record-ios record-android verify-ios verify-android

help:
	@echo "HoneyDue KMM — common tasks"
	@echo ""
	@echo "  make verify-snapshots    Verify iOS + Android parity goldens (CI gate)"
	@echo "  make record-snapshots    Regenerate iOS + Android goldens + optimize"
	@echo "  make optimize-goldens    Run the PNG optimizer across both directories"
	@echo ""
	@echo "  make verify-ios          Verify just the iOS gallery"
	@echo "  make verify-android      Verify just the Android gallery"
	@echo "  make record-ios          Regenerate just the iOS gallery"
	@echo "  make record-android      Regenerate just the Android gallery"
	@echo ""

# ---- Parity gallery (combined) ----

# Regenerate every parity-gallery golden (iOS + Android) and shrink the
# output PNGs. Slow (~3 min); run after intentional UI changes only.
record-snapshots:
	@./scripts/record_snapshots.sh

# Verify current UI matches committed goldens. Fast (~1 min). PR gate.
verify-snapshots:
	@./scripts/verify_snapshots.sh

# Optimize every PNG golden in-place (idempotent). Usually invoked
# automatically by record-snapshots; exposed here for one-off cleanup.
optimize-goldens:
	@./scripts/optimize_goldens.sh

# ---- Parity gallery (single platform) ----

record-ios:
	@./scripts/record_snapshots.sh --ios-only

record-android:
	@./scripts/record_snapshots.sh --android-only

verify-ios:
	@./scripts/verify_snapshots.sh --ios-only

verify-android:
	@./scripts/verify_snapshots.sh --android-only
