Files
Vorleser-Kit/scripts/verify.sh
T

34 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Full verification gate. Must be green before a task is marked done (AGENTS.md).
set -euo pipefail
cd "$(dirname "$0")/.."
PKG=Packages/VorleserKit
step() { printf '\n\033[1m▶ %s\033[0m\n' "$*"; }
step "Format check"
if command -v swiftformat >/dev/null; then swiftformat --lint App "$PKG"; else echo "skip: swiftformat not installed"; fi
step "Lint"
if command -v swiftlint >/dev/null; then swiftlint lint --strict --quiet App "$PKG/Sources"; else echo "skip: swiftlint not installed"; fi
step "Privacy checks"
scripts/privacy-check.sh
step "Package build"
swift build --package-path "$PKG"
step "Package tests"
swift test --package-path "$PKG" --skip VorleserLiveTests
step "App build"
if command -v xcodegen >/dev/null; then
xcodegen generate --spec project.yml --quiet
xcodebuild -project Vorleser.xcodeproj -scheme Vorleser -configuration Debug \
-derivedDataPath .build/xcode -destination 'platform=macOS,arch=arm64' -quiet build
else
echo "skip: xcodegen not installed (make bootstrap)"
fi
printf '\n\033[32m✔ verify passed\033[0m\n'