#!/usr/bin/env bash # Rebuilds the brand images from the simulation that draws the landing page, # into site/public/, where Astro's passthrough copies them verbatim into # dist/. # # Unlike the wasm build, this needs no toolchain the workspace does not # already have: it is one native `cargo run`. And unlike the wasm output, its # results are committed — a favicon that only exists after someone runs a # script is a favicon that is missing from the first deploy of a fresh # checkout. Committing generated files is only honest if something proves # they are current, which is what `--check` is for: # # scripts/build-brand.sh # rewrite them # scripts/build-brand.sh --check # fail if the tree is stale # # The check is a CI step (scripts/ci.sh), not a commit hook: a full anneal of # every mark is tens of seconds, which is not a wait to put in front of every # commit. # # The generator is crates/didbot-brand's `render` example: something run from # a checkout to refresh committed files, never installed. # # What gets written, at what size, from which mark is crates/didbot-brand's # ASSETS list and nowhere else. Adding one is an entry there, then this. set -euo pipefail cd "$(dirname "$0")/.." # Release, not debug: the anneal is 1,200 sweeps over every site of every # mark's lattice, which is a couple of seconds optimised and minutes not. exec cargo run --release --quiet --package didbot-brand --example render -- \ "$@" site/public