3232 you've just run verify yourself and don't
3333 want to wait another minute.
3434
35+ -SkipShowcase — skip the showcase steps (GH_BASE flip +
36+ ShowcaseSync regen) and leave the showcase
37+ out of the release commit. Use for a pure
38+ code release where no example render changed,
39+ so you don't need fresh generated PDFs. The
40+ version bump still updates web/index.html.
41+
3542. EXAMPLE
3643 pwsh ./scripts/cut-release.ps1 -Version 1.6.0
3744 # full release of v1.6.0
7279 [Parameter (ParameterSetName = ' Release' )]
7380 [switch ]$SkipVerify ,
7481
82+ [Parameter (ParameterSetName = ' Release' )]
83+ [switch ]$SkipShowcase ,
84+
7585 [Parameter (Mandatory = $true , ParameterSetName = ' PostRelease' )]
7686 [switch ]$PostReleaseOnly
7787)
@@ -467,11 +477,15 @@ try {
467477 }
468478 }
469479
470- Step 3 " Switch ShowcaseMetadata GH_BASE to /blob/$tag "
471- Update-ShowcaseGhBase $tag | Out-Null
480+ if (-not $SkipShowcase ) {
481+ Step 3 " Switch ShowcaseMetadata GH_BASE to /blob/$tag "
482+ Update-ShowcaseGhBase $tag | Out-Null
472483
473- Step 4 " Regenerate web/examples.json with $tag links"
474- Run- ShowcaseSync
484+ Step 4 " Regenerate web/examples.json with $tag links"
485+ Run- ShowcaseSync
486+ } else {
487+ Step 3 " Skipped showcase GH_BASE flip + regen (-SkipShowcase)"
488+ }
475489
476490 if (-not $SkipVerify ) {
477491 Step 5 " Run mvnw verify (sanity check)"
@@ -494,22 +508,29 @@ try {
494508
495509 Step 6 " Commit release"
496510 $commitMsg = " Release v$Version "
511+ # Version/doc files always ship; the showcase files only when it was regenerated.
512+ $commitFiles = @ (
513+ ' pom.xml' ,
514+ ' aggregator/pom.xml' ,
515+ ' bundle/pom.xml' ,
516+ ' examples/pom.xml' ,
517+ ' benchmarks/pom.xml' ,
518+ ' README.md' ,
519+ ' CHANGELOG.md' ,
520+ ' web/index.html'
521+ )
522+ if (-not $SkipShowcase ) {
523+ $commitFiles += @ (
524+ ' examples/src/main/java/com/demcha/examples/support/ShowcaseMetadata.java' ,
525+ ' web/examples.json' ,
526+ ' web/showcase'
527+ )
528+ }
497529 if ($DryRun ) {
498- Write-Host " [DRY RUN] git add pom.xml aggregator/pom.xml bundle/pom.xml examples/pom.xml benchmarks/pom.xml README.md CHANGELOG.md examples/src/main/java/com/demcha/examples/support/ShowcaseMetadata.java web/examples.json web/index.html web/showcase " - ForegroundColor Yellow
530+ Write-Host " [DRY RUN] git add $ ( $commitFiles -join ' ' ) " - ForegroundColor Yellow
499531 Write-Host " [DRY RUN] git commit -m `" $commitMsg `" " - ForegroundColor Yellow
500532 } else {
501- git add `
502- pom.xml `
503- aggregator/ pom.xml `
504- bundle/ pom.xml `
505- examples/ pom.xml `
506- benchmarks/ pom.xml `
507- README.md `
508- CHANGELOG.md `
509- examples/ src/ main/ java/ com/ demcha/ examples/ support/ ShowcaseMetadata.java `
510- web/ examples.json `
511- web/ index.html `
512- web/ showcase
533+ git add @commitFiles
513534 git commit - m $commitMsg
514535 Note " commit: $commitMsg "
515536 }
0 commit comments