fix(make): SCRAPE_INPUT tracks latest.html symlink (#4)

regen-from-fixture (used by ci.yml codegen-clean gate) hardcoded
testdata/html/snapshot_2026-05-08.html. After regen.yml committed a
newer snapshot via PR, the pinned path drifted from committed api/
output and codegen-clean failed on main.

Resolving SCRAPE_INPUT via `readlink testdata/html/latest.html` lets
each regen automatically advance the fixture pointer without a manual
Makefile bump, while preserving the override (`SCRAPE_INPUT=path \
make regen-from-fixture`) for ad-hoc replays of historical snapshots.
This commit is contained in:
2026-05-20 23:23:02 +01:00
committed by GitHub
parent f5250197b7
commit 99c906c3c5
+4 -1
View File
@@ -35,7 +35,10 @@ lint: vet
integration:
$(GO) test -tags=integration -v ./test/integration/...
SCRAPE_INPUT ?= testdata/html/snapshot_2026-05-08.html
# Resolve via testdata/html/latest.html symlink so the pinned-fixture target
# auto-tracks whatever snapshot regen.yml last committed. Override with
# SCRAPE_INPUT=path/to/snapshot.html for ad-hoc replays.
SCRAPE_INPUT ?= testdata/html/$(shell readlink testdata/html/latest.html)
SCRAPE_OUTPUT ?= internal/spec/api.json
snapshot: