#!/bin/sh # Release 8 slice E (by name, never `all` until the docker build image is rebuilt): rebuild + deploy the five official sites by name (per-site host path), then the hub. R=/home/user/Projects/yt-dlp-transcript-browser; T=${CLAUDE_JOB_DIR:?set CLAUDE_JOB_DIR}/tmp; REL=${REL:-r9} cd $R || exit 1 export WORKER_TOKEN=$(grep ^WORKER_TOKEN= editor/.env | cut -d= -f2); export ARCHILYZER_AGENT=fable-rollout echo "START $(date +%T) $(git rev-parse --short HEAD)" s=$(date +%s); pnpm -s ops build-deploy --json '{"siteIds":["jeralyzer","anilyzer","bonnellyzer","hasanalyzer","rekietalyzer"],"skipArchives":true}' --wait --wait-timeout 7200 > $T/$REL-ops-build-deploy-sites.log 2>&1; echo "sites_exit=$? $(( $(date +%s)-s ))s $(tr -d '\033' < $T/$REL-ops-build-deploy-sites.log | grep -o '"jobId": "[^"]*"\|"error": "[^"]*"\|\[deployed\] [^ ]*' | tr '\n' ' ' | cut -c1-400)" s=$(date +%s); pnpm -s ops build-hub --json '{}' --wait > $T/$REL-ops-build-hub.log 2>&1; echo "build_hub_exit=$? $(( $(date +%s)-s ))s" s=$(date +%s); pnpm -s ops deploy-hub --json '{}' --wait > $T/$REL-ops-deploy-hub.log 2>&1; echo "deploy_hub_exit=$? $(( $(date +%s)-s ))s $(grep -o 'https://[a-z0-9.-]*archilyzer-hub.pages.dev' $T/$REL-ops-deploy-hub.log | tail -1)" echo "exit=0 $(date +%T)"