Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334#!/bin/shset -eu[ -z "${WEB_CMD:-}" ] && [ "$WEB_BIN" = "$WEB_BUILT" ] || exit 0web=$TNGL_ROOT/webdata=$TNGL_STATE/data/webmkdir -p "$data"
# the ghstub client id and secret have to match make-certs.sh and github-stubif [ ! -s "$TNGL_CERTS/github.env" ]; then secret=$(head -c 24 /dev/urandom | od -An -tx1 | tr -d ' \n') printf 'GITHUB_CLIENT_ID=ghstub-client-id\nGITHUB_CLIENT_SECRET=ghstub-client-secret\nGITHUB_SESSION_SECRET=%s\nGITHUB_APP_SLUG=tangled-dev-stub\n' "$secret" > "$TNGL_CERTS/github.env"fi
# fonts and logos only exist as a nix package, and web-hash covers web/static so a change rebuildsstatic=$(cd "$TNGL_ROOT" && nix build .#web-static-files --no-link --print-out-paths)if [ "$(cat "$data/static" 2>/dev/null || true)" != "$static" ] || [ ! -d "$web/static/fonts" ]; then mkdir -p "$web/static" rm -rf "$web/static/fonts" "$web/static/logos" cp -fr --no-preserve=ownership,mode "$static"/* "$web/static" echo "$static" > "$data/static"fi
want="$(node "$TNGL_ROOT/e2e/harness/web-hash.ts") $(cksum < "$TNGL_PC/services/web/web.env" | cut -d ' ' -f 1)"[ "$(cat "$data/built" 2>/dev/null || true)" != "$want" ] || { patch-workerd "$web"; exit 0; }
set -a. "$TNGL_PC/services/web/web.env"set +acd "$web"corepack pnpm install --frozen-lockfilepatch-workerd "$web""$WEB_BIN" buildecho "$want" > "$data/built"