setup.conf
Rama main · réplica de lectura del repositorio original.
# =============================================================================
# WireBuddy - Setup & Deployment
# =============================================================================
# --- Local Development Setup ---
command -v python3.13 >/dev/null 2>&1 && PYTHON=python3.13 || PYTHON=python3
$PYTHON -m venv /opt/wirebuddy/.venv
source /opt/wirebuddy/.venv/bin/activate
pip install --upgrade pip
pip install -e "/opt/wirebuddy[dev]"
# --- Start Dev Server ---
export WIREBUDDY_SECRET_KEY="l+QGUq6BH9dLZkAQpG2jivXZeLLwYNMCmzUsfcD2wPM="
export LOG_LEVEL="DEBUG"
export TZ="Europe/Berlin"
cd /opt/wirebuddy && source .venv/bin/activate && python run.py
# --- Docker Login ---
docker login xxx
docker login # Docker Hub
# --- Build & Push Image ---
PROJECT="wirebuddy" && \
cd "/opt/${PROJECT}" && \
VERSION="$(python3 -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" && \
GIT_SHA="$(git rev-parse --verify HEAD)" && \
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" && \
printf 'APP_VERSION=%s\nGIT_SHA=%s\nBUILD_DATE=%s\n' \
"$VERSION" "$GIT_SHA" "$BUILD_DATE" > BUILD_INFO && \
docker buildx build \
--platform linux/amd64 \
--pull \
-f docker/Dockerfile \
--build-arg APP_VERSION="$VERSION" \
--build-arg VCS_REF="$GIT_SHA" \
--build-arg BUILD_DATE="$BUILD_DATE" \
-t "docker.cirrio.de/${PROJECT}:${VERSION}" \
-t "docker.cirrio.de/${PROJECT}:latest" \
--push \
.
# Local Build
cd /opt/wirebuddy
docker build \
--pull \
--target runtime \
-t wirebuddy:local \
-f docker/Dockerfile \
.
docker compose down && docker compose pull && docker compose up -d
# Install Node
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# --- UI Setup ---
# --- Lightpanda ---
curl -fsSL https://pkg.lightpanda.io/install.sh -o /tmp/lightpanda-install.sh
less /tmp/lightpanda-install.sh
bash /tmp/lightpanda-install.sh
export PATH="$HOME/.local/bin:$PATH"
lightpanda version
lightpanda serve --host 127.0.0.1 --port 9222
# --- Full browsers ---
UX_TOOLS_DIR=/opt/ux-test-tools
mkdir -p "$UX_TOOLS_DIR" || exit
cd "$UX_TOOLS_DIR" || exit
[ -f package.json ] || npm init -y
npm install --save --no-package-lock playwright@latest @axe-core/playwright@latest
./node_modules/.bin/playwright install --with-deps chromium webkit firefox
# ./node_modules/.bin/playwright install --list
# ./node_modules/.bin/playwright uninstall --all
# --- ui-lint ---
cd /opt/wirebuddy/tools/ui-lint || exit
npm ci
npm run install:browsers
# --- Browser E2E (isolated instance) ---
cd /opt/wirebuddy || exit
UX_TOOLS_DIR=/opt/ux-test-tools
UX_ARTIFACT_DIR=$(mktemp -d /tmp/wb-ux-e2e.XXXXXX)
PLAYWRIGHT_DIR="$UX_TOOLS_DIR" PYTHON=/opt/wirebuddy/.venv/bin/python BROWSER=chromium \
node tests/e2e/ui_lint_isolated.mjs "$UX_ARTIFACT_DIR"
PLAYWRIGHT_DIR="$UX_TOOLS_DIR" PYTHON=/opt/wirebuddy/.venv/bin/python BROWSER=chromium COLOR_SCHEME=light \
node tests/e2e/live_resize.mjs "$UX_ARTIFACT_DIR"
PLAYWRIGHT_DIR="$UX_TOOLS_DIR" PYTHON=/opt/wirebuddy/.venv/bin/python BROWSER=webkit COLOR_SCHEME=light \
node tests/e2e/ios_viewport_audit.mjs "$UX_ARTIFACT_DIR"
# Screenshot Mockups
https://shots.so/
# Prune
docker system prune -af
docker buildx prune -af
# --- Create Changelog ---
Vergleiche die Commits seit dem letzten Release-Tag (z. B. v1.2.2) mit dem aktuellen Feature-Branch und erstelle/aktualisiere die /opt/wirebuddy/CHANGELOG.md in englischer Sprache. Nutze dafür Commit-Messages und Code-Diff, um die Änderungen zu analysieren. Formuliere die Changelog kompakt und stichpunktartig - pro Punkt maximal 1-2 Sätze, nur das Wichtigste aus Sicht eines Endbenutzers.
Unterteile zwischen "New", "Fix" und "Security". "New" Punkte immer als Erstes auflisten. Fokussiere Dich ausschliesslich auf funktionale Änderungen; Design-Änderungen und rein interne Arbeit (Refactorings, Tests) werden weggelassen.
Prüfe, ob die Dokumentation sowie die beiden README-Dateien den aktuellen Stand entsprechen. Achte darauf, dass die Inhalte in englischer Sprache vorliegen.
# --- Squash Commit ---
Squash-merge all commits into main, create a new tag, tag it as v<version> (version from pyproject.toml), and push the tag. Use as commit Message "Release <version>" Then delete the feature branch locally and remotely.
# --- Commit ---
Erstelle eine Commit Message auf Basis der Änderungen auf Englisch und comitte den aktuellen Stand in das Repo. Aber pushe nicht!