From 05928d6c01112bbccf0778a3678aa24ee03f43e1 Mon Sep 17 00:00:00 2001 From: DemchaAV Date: Sun, 12 Jul 2026 23:36:51 +0100 Subject: [PATCH] fix(release): recompile examples before ShowcaseSync so View Code links track the tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 3 of the cut rewrites ShowcaseMetadata.GH_BASE to /blob/, but Run-ShowcaseSync ran exec:java without recompiling — so ShowcaseSync serialized examples.json from the previously-compiled ShowcaseMetadata and every 'View Code' link kept the prior release's ref. The deployed 2.0 site would link all example source at /blob/v1.9.0. Add -DskipTests compile before exec:java, mirroring Render-ReadmeBanner, which already recompiles so the banner reads the filtered project version. --- scripts/cut-release.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/cut-release.ps1 b/scripts/cut-release.ps1 index ae16b326..d0d02c4d 100644 --- a/scripts/cut-release.ps1 +++ b/scripts/cut-release.ps1 @@ -318,7 +318,7 @@ function Run-ShowcaseSync { foreach ($modulePom in $exampleSnapshotSiblings) { Write-Host " [DRY RUN] $mvnw -B -ntp -DskipTests install -f $modulePom" -ForegroundColor Yellow } - Write-Host " [DRY RUN] $mvnw -f examples/pom.xml exec:java $execProp" -ForegroundColor Yellow + Write-Host " [DRY RUN] $mvnw -B -ntp -f examples/pom.xml -DskipTests compile exec:java $execProp" -ForegroundColor Yellow return } Push-Location $repoRoot @@ -352,7 +352,12 @@ function Run-ShowcaseSync { throw "Install $modulePom failed (exit $LASTEXITCODE)" } } - & $mvnw -f examples/pom.xml exec:java $execProp 2>&1 | ForEach-Object { + # `compile` before exec:java is REQUIRED: Step 3 rewrote ShowcaseMetadata.GH_BASE + # to /blob/, and exec:java runs the COMPILED class. Without recompiling it here, + # ShowcaseSync would emit examples.json with the previous release's "View Code" links + # (the drift that shipped a 2.0 site still linking /blob/v1.9.0). Mirrors + # Render-ReadmeBanner, which recompiles for the same filtered-source reason. + & $mvnw -B -ntp -f examples/pom.xml -DskipTests compile exec:java $execProp 2>&1 | ForEach-Object { if ($_ -match 'Synced|Wrote manifest|BUILD SUCCESS|BUILD FAILURE|ERROR') { Write-Host " $_" -ForegroundColor DarkGray }