; Regenerate the committed traces: REGEN=1 dune build @regen.
; (enabled_if REGEN=1) keeps the rule absent during normal dune test, so the
; traces stay pure committed source and the docker daemon is never contacted;
; only REGEN=1 makes them promote targets and runs the capture script.

(rule
 (alias regen)
 (mode promote)
 (enabled_if
  (= %{env:REGEN=0} 1))
 (targets version.json ping.headers)
 (deps
  (source_tree ../scripts))
 (action
  (run bash ../scripts/generate.sh .)))
