Skip to content

feat(release-script): re-render the previews a cut publishes - #488

Merged
DemchaAV merged 3 commits into
developfrom
feat/release-asset-refresh
Aug 2, 2026
Merged

feat(release-script): re-render the previews a cut publishes#488
DemchaAV merged 3 commits into
developfrom
feat/release-asset-refresh

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Last of the three changes for #461, and the one that makes the gate in #487 survive a release. This should land before the next cut#487 alone leaves the previews a version behind at every tag.

Why

The committed previews record the version they were rendered at, and nothing moved it. A cut bumped every pom, regenerated web/showcase at the new version, and left assets/readme/** on the release before. The drift gate could not notice: it renders and compares both sides at the recorded version, so it stayed green while the figures README and the site show fell a release out of date — at every tag, invisibly. That is the same drift the gate was written to end, arriving through the one door it does not watch.

What

The version moves with the tag — and only a final one. Update-AssetVersion is deliberately separate from the generic pom bump: the post-release step carries the train to X.Y.(Z+1)-SNAPSHOT and a pre-release cut carries X.Y.Z-rc.N, and the examples module rejects both as display versions — the -rc form's qualifier-stripped version names a release that does not exist yet. It also stands outside the generic bump's early return, so a cut interrupted after the version bump can be re-run to finish the job.

The previews are re-rendered from the catalogue the site is built from. A new step renders the catalogue at $Version and copies each committed preview's counterpart over it. Which previews are published is the folder itself — every file already there is refreshed and nothing new is added, so the refresh and the gate cannot disagree about what is published. A committed preview no example renders fails the step by name rather than reaching the gate as a puzzle.

A pre-release leaves the README assets alone, on the last published version, and stages neither them nor the property.

It runs before mvnw verify, because that is where the gate compares them. Scheduled after, a cut would fail on exactly the files it was about to bring up to date.

-SkipShowcase skips only what it names. Generating the catalogue and syncing the site were one function, so skipping the site skipped the render too. They are separate now: Build-ExampleCatalogue and Sync-ShowcaseSite. The previews ship in the repository and are refreshed either way; -PostReleaseOnly leaves them alone, since they belong to the tag rather than to the branch it opens.

assets/readme/examples joins the staging allow-list, so the refresh reaches the release commit.

The refresh and the staging list sit in different parts of the script and neither fails without the other — a refresh that is not staged tags the previous release's figures, a staged path nothing refreshes commits whatever is in the working tree. ReleaseAssetStepGuardTest holds them together, and holds the refresh before the step that checks it.

Tests

core 426 tests, examples 71 and qa 688, green locally. The script parses clean, and was dry-run in all three modes:

Mode assetVersion catalogue previews web/showcase
final cut 9.9.9 9.9.9 rendered refreshed + staged synced + staged
final cut -SkipShowcase 9.9.9 rendered refreshed + staged skipped
pre-release 2.1.0-rc.1 untouched rendered untouched synced
-PostReleaseOnly untouched rendered for examples.json untouched branch links
Check Result
the release script refreshes the committed previews and commits them passes
the previews are refreshed before the step that checks them passes
only a final cut moves the version the previews record passes

The three modes are also exercised for real in release-script-check.yml, asserting the branch that ran rather than the file a dry run does not write: a final cut moves the version, a pre-release and the post-release pass do not.

Out of scope

The committed previews record the version they were rendered at, and nothing
moved it. A cut bumped every pom, regenerated the showcase site at the new
version, and left assets/readme on the release before — with the drift gate
comparing both sides at the recorded version and staying green through it. The
figures README and the site show would have gone one release out of date at
every tag, invisibly, which is the drift the gate was written to end.

The cut now moves that property with the tag and re-renders the previews from
the same catalogue the site is built from. It runs before the verify step,
because that is where the gate compares them: scheduled after it, a cut would
fail on exactly the files it was about to bring up to date.

Generating the catalogue and syncing the site were one function, so skipping
the site skipped the render as well. They are separate now, and -SkipShowcase
skips only what it names — the published tree under web/. The previews ship in
the repository and are refreshed either way; -PostReleaseOnly leaves them
alone, since they belong to the tag rather than to the branch it opens.

The two halves — the refresh and the staging list that carries it into the
release commit — sit in different parts of the script and neither fails
without the other, so a guard holds them together, and holds the refresh
before the step that checks it.

Dry-run in all three modes: a plain cut bumps the property, renders, refreshes
67 previews and stages them; -SkipShowcase does the same without touching
web/; -PostReleaseOnly touches neither.
…where else

Bumping it inside Update-PomVersion put it on every pom that pass touches, in
every mode that calls it. The post-release step carries the train to
X.Y.(Z+1)-SNAPSHOT and would have carried this with it; surefire hands the
value to the examples module as a display version, and ExampleVersion accepts a
released X.Y.Z and nothing else, so the next build would have thrown before
comparing a single preview. A pre-release cut is the same defect with a
different value: X.Y.Z-rc.N is rejected too, and its qualifier-stripped form
names a release that does not exist — the previews would have advertised it.

Neither showed in a dry run. This tree is already on a -SNAPSHOT, so the
post-release bump finds nothing to do and never reaches the property, and a
dry run writes no pom, so an -rc cut had nothing to inspect. The check is the
branch that ran rather than the file that changed, and the release-script
workflow now asserts all three: a final cut moves it, a pre-release and the
post-release pass leave it alone.

The move lives in its own step, called only for a final tag, and the README
assets follow it there — a pre-release leaves the previews and the property on
the last published version and stages neither. It also stands outside
Update-PomVersion's early return: a cut interrupted after the version bump left
the property behind, and re-running reported nothing to do.
The committed folder is flat, so a file name is the whole address. Two
rendered documents sharing one left whichever the directory walk reached
first deciding what a preview was refreshed from — the same silence
CommittedAssetDriftTest refuses, and it refuses it a step later, so an
ordinary cut would have caught this at verify. Not a cut run with
-SkipVerify: there the wrong document ships under the right name, and
nothing says so.
@DemchaAV
DemchaAV merged commit 69ee5cf into develop Aug 2, 2026
14 checks passed
@DemchaAV
DemchaAV deleted the feat/release-asset-refresh branch August 2, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant