Files
honeyDueKMP/Makefile
Trey T 3bac38449c P3.1: iOS goldens @2x + PNG optimizer + Makefile record/verify targets
- SnapshotGalleryTests rendered at displayScale: 2.0 (was native 3.0)
  → 49MB → 15MB (~69% reduction)
- Records via SNAPSHOT_TESTING_RECORD=1 env var (no code edits needed)
- scripts/optimize_goldens.sh runs zopflipng (or pngcrush fallback)
  over both iOS and Android golden dirs
- scripts/{record,verify}_snapshots.sh one-command wrappers
- Makefile targets: make {record,verify,optimize}-snapshots

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 23:45:02 -05:00

56 lines
1.9 KiB
Makefile

# 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