Files
MindSift/e2e/screenshots.sh
T
sandrodachandClaude Opus 5.5 508717cc02
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m13s
docs: renewed README and light/dark diagonal screenshots; wider hashtag tiles
- README: current features (journal, focus mode, push, themes, sharing
  into the inbox), outgoing connections, :latest instead of :stable,
  VAPID_* and LEGAL_CUSTOM_LINK_*, new journal and phone screenshots
- e2e/screenshots.sh: light and dark in the same state joined along a
  diagonal, own container/port per run
- hashtag tiles at least 18rem wide

chore(release): v0.15.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 00:41:20 +01:00

37 lines
1.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# Builds MindSift, starts it in demo mode with a fresh database and renews the README screenshots
# in screenshots/ (light and dark theme joined along a diagonal). Requires podman (or docker via
# ENGINE=docker). Usage: e2e/screenshots.sh, other theme pair: SHOT_LIGHT=fjord SHOT_DARK=fjord-night
set -euo pipefail
ENGINE="${ENGINE:-podman}"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
WORK="$(mktemp -d)"
RUN_ID="$$-$RANDOM"
NAME="mindsift-shots-$RUN_ID"
IMAGE="mindsift-shots-image:$RUN_ID"
PORT="${SHOTS_PORT:-}"
if [ -z "$PORT" ]; then
for p in $(shuf -i 18100-18999 -n 50); do
if ! (exec 3<>"/dev/tcp/127.0.0.1/$p") 2>/dev/null; then PORT="$p"; break; fi
done
fi
cleanup() {
"$ENGINE" rm -f "$NAME" >/dev/null 2>&1 || true
"$ENGINE" rmi "$IMAGE" >/dev/null 2>&1 || true
rm -rf "$WORK"
}
trap cleanup EXIT
echo "Baue Image …"
# Version in the header, e.g. APP_VERSION=v0.2 e2e/screenshots.sh
"$ENGINE" build -q --build-arg APP_VERSION="${APP_VERSION:-}" -t "$IMAGE" "$ROOT" >/dev/null
"$ENGINE" run -d --name "$NAME" --network host -e PORT="$PORT" -e MINDA_DEMO=true -e DEMO_RESET_MINUTES=0 \
-e JWT_SECRET=screenshots-only-secret -v "$WORK":/data:Z "$IMAGE" >/dev/null
for _ in $(seq 1 60); do curl -s -m 1 "http://localhost:$PORT/api/v1/health" >/dev/null && break; sleep 0.5; done
echo "Erstelle Screenshots …"
"$ENGINE" run --rm --network host -e MINDSIFT_URL="http://localhost:$PORT" -e SHOTS_DIR=/shots \
-e SHOT_LIGHT="${SHOT_LIGHT:-light}" -e SHOT_DARK="${SHOT_DARK:-dark}" -e LANG=de_DE.UTF-8 -e TZ=Europe/Berlin \
-v "$ROOT/e2e":/e2e:Z -v "$ROOT/screenshots":/shots:Z -w /e2e mcr.microsoft.com/playwright:v1.48.2-jammy \
sh -c 'npm install --no-audit --no-fund >/dev/null 2>&1 && node screenshots.mjs'