| M | bin/ | 7 | ++++++- |
| A | test/ | 31 | ++++++++++++++++++++++++++++++ |
@@ -2493,7 +2493,12 @@ build_private() {
24932493 t0=$(date +%s)24942494 write_graph "$FORGE_ROOT/$only.git"24952495 private_www2496- (cd "$FORGE_HOME" && FORGE_PRIVATE=1 FORGE_ONLY=$only FORGE_WWW=$out FORGE_LIVE_WWW=$FORGE_PRIVATE_WWW FORGE_PUBLIC_WWW=$FORGE_WWW \2496+ # The public root, named before FORGE_WWW=$out below: in one command's2497+ # assignments, whether a later one sees an earlier one differs between2498+ # shells, and the build's assets must carry over the public pages'2499+ # bundles, or a private build would drop them from www/assets.2500+ public=$FORGE_WWW2501+ (cd "$FORGE_HOME" && FORGE_PRIVATE=1 FORGE_ONLY=$only FORGE_WWW=$out FORGE_LIVE_WWW=$FORGE_PRIVATE_WWW FORGE_PUBLIC_WWW=$public \24972502 FORGE_BUILD_STARTED=$((t0 * 1000)) FORGE_BUILD_REASON=${FORGE_BUILD_REASON:-manual} \24982503 "$FORGE_HOME/node_modules/.bin/eleventy" --config=eleventy.config.ts --quiet --output="$out")24992504 mkdir -p "$FORGE_WWW"@@ -0,0 +1,31 @@
1+# A private repo's build ships its assets into the public www/assets too,2+# so it must carry over every bundle the public pages link: here the3+# reviews page of a public repo, whose CSS bundle no private page renders.4+# Each page's stylesheets must exist after every kind of build.5+. "$(dirname "$0")/../lib.sh"6+user dami7+repo dami/pub8+repo --private dami/sec9+clone dami dami/pub "$T/w/p"10+at "$T/w/p" commit "first"11+push_as dami "$T/w/p" origin main12+at "$T/w/p" git switch -q -c dami/x13+at "$T/w/p" commit "x"14+push_as dami "$T/w/p" origin dami/x15+clone dami dami/sec "$T/w/s"16+at "$T/w/s" commit "first"17+push_as dami "$T/w/s" origin main18+# Every stylesheet the public pages link is in www/assets.19+styles() {20+ for f in $(grep -rhoE 'href="/assets/[^"]+\.css"' "$FORGE_WWW/dami/pub" "$FORGE_WWW/index.html" | sed 's/href="\/assets\///; s/"//' | sort -u); do21+ [ -f "$FORGE_WWW/assets/$f" ] || fail "$1: a public page links /assets/$f, which isn't there"22+ done23+}24+build dami/pub25+styles "after the public build"26+build dami/sec27+styles "after a private build"28+build29+styles "after a full build"30+build dami/sec31+styles "after another private build"