1#!/bin/bash
2# Minimal deterministic build for the StaticSite fixture: copy src/ -> dist/.
3#
4# We sleep briefly before *and* during the copy so that any Worker.update
5# that races against this build (e.g. reading dist/ mid-write) has a wide
6# enough window to actually trip. The user-visible bug this test guards
7# against — "two deploys needed to publish assets" — only manifests when
8# the build takes meaningful wall time, which a real astro/vite build
9# does but a one-line `cp` does not.
10set -euo pipefail
11sleep 0.5
12rm -rf dist
13mkdir -p dist
14sleep 0.5
15cp -R src/. dist/