Files

24 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Regenerates every file in output/. Needs JDK 25, Maven, Docker (for 11-upsert) and network
# access to Maven Central and GitHub. No model provider is called and no API key is needed.
set -euo pipefail
cd "$(dirname "$0")/.."
mkdir -p target
echo "== probes: one source tree against four Spring AI versions"
for pair in 2.0.0:4.1.0 2.0.2:4.1.0 2.0.3:4.1.0 2.1.0:4.2.0; do
v=${pair%:*}
(cd probes && mvn -B clean test -Dspring-ai.version="$v" -Dboot.version="${pair#*:}" > "../target/probe-$v.log")
done
{
echo "# javac -Xlint:deprecation,removal on probes/.../LegacyAssistant.java (from the Maven build log)"
for v in 2.0.3 2.1.0; do echo "Spring AI $v: $(grep -c 'WARNING.*LegacyAssistant' "target/probe-$v.log" || true) warnings"; done
grep 'WARNING.*LegacyAssistant' target/probe-2.1.0.log \
| sed -E 's#.*LegacyAssistant.java:#LegacyAssistant.java:#; s/org\.springframework\.ai\.//g; s/@org\.jspecify\.annotations\.Nullable java\.lang\.//'
} > output/06-legacy-warnings.txt
echo "== compile breaks"; scripts/compile-breaks.sh > /dev/null
echo "== 2.1.0 module"; mvn -B clean test > target-main.log; mkdir -p target && mv target-main.log target/main.log
echo "== API, config, BOM"; scripts/api-diff.sh > /dev/null; scripts/bom-diff.sh > /dev/null
echo "== checklist"; scripts/grep-checklist.sh legacy-app > output/16-grep-checklist.txt
echo "== OpenRewrite"; scripts/openrewrite.sh > /dev/null
echo done