Branchwell

Jotley / app · jotley.ai / scripts / check-summary-templates.sh

Raw 865 B on d2c8e7812d9b8c1cc5857eb6dc912d99bc5c9048
1#!/bin/zsh
2# Generates a real on-device summary with every template and checks the
3# structured rendering. Needs Apple Intelligence on this Mac and a Debug build.
4set -euo pipefail
5repo_root="$(cd "$(dirname "$0")/.." && pwd)"
6products="${JOTLEY_MAC_BUILD_PRODUCTS:-/tmp/jotley-local-xcode-build/Build/Products/Debug}"
7work="$(mktemp -d /tmp/jotley-summary-templates.XXXXXX)"
8cp "$products/Jotley.app/Contents/MacOS/Jotley.debug.dylib" "$work/"
9xcrun swiftc -parse-as-library -target "$(uname -m)-apple-macos27.0" -sdk "$(xcrun --sdk macosx --show-sdk-path)" \
10 -I "$products" -F "$products" "$repo_root/scripts/summary-template-check.swift" "$work/Jotley.debug.dylib" \
11 -Xlinker -rpath -Xlinker @executable_path -Xlinker -rpath -Xlinker "$products" -o "$work/summary-template-check"
12cd "$work" && ./summary-template-check "$@"
13echo "Results and renders: $work"