- Default (build) mode picks up only *.json files for which NO variant folder
(../<name>/) exists yet, so an existing variant is never clobbered by a
build run (e.g. by a just-copied, not-yet-adjusted json). At the end it lists
the jsons that were NOT picked up and advises that they possibly need to be
re-built via 'build_all.sh --rebuild'.
- '--rebuild' mode picks up only *.json files whose variant folder already
exists, and advises about the jsons without a variant yet (build them with
the default mode).
- Both modes print a 'N built, M failed, K not picked up' summary, exit non-zero
on any build failure, and keep the owner follow-up actions (reset themes in
the LS admin, flushassets, Ctrl+F5).
- README build/rebuild sections and AGENTS.md updated to the two modes.
Verified in a /tmp sandbox: build mode built only the json without a variant
folder and listed the existing ones with the --rebuild advice; --rebuild built
only existing variants and listed the new json with the build advice; on the
real definitions dir the default mode built 0 and skipped all 3 (variants
exist) without touching ../respondage_respondage/config.xml (md5 unchanged).
export_public.sh exit 0.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- New variants/build_all.sh: rebuilds ALL variants from their json definitions
in one go (loops over <definitions-dir>/*.json, calls build.php per variant,
aggregates failures, exits non-zero on any failure) and prints the owner
follow-up actions (reset each variant theme in the LS admin, flushassets,
Ctrl+F5). Generic tooling — no client names — so it ships in the public repo.
- README.md: the variants workflow is now split into a 'Build process' (defining
a NEW variant: json + assets in the private definitions repo, build.php,
deploy + theme reset + flushassets) and a 'Rebuild process' (build_all.sh after
a mother config.xml change or a definitions change). The preview section now
documents the standing rules: variant preview must differ from the mother's,
preview.svg is committed + synced publicly, added only at first creation and
never overwritten.
- AGENTS.md propagation rule now points at build_all.sh.
Verified: bash -n clean; PHP_BIN=/usr/bin/php bash variants/build_all.sh variants
-> '2 built, 0 failed', rc=0, both variants' preview.svg untouched (md5 before =
after); export_public.sh exit 0 with build_all.sh in the zip.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>