Skip to content

Commit d615214

Browse files
authored
build(release): publish the showcase the cut produced, not the one lying in target (#477)
* build(release): publish the showcase the cut produced, not the one lying in target cut-release.ps1 never ran GenerateAllExamples. Run-ShowcaseSync installed the train siblings, recompiled the examples so ShowcaseMetadata.GH_BASE pointed at the tag, and then synced whatever happened to be sitting in examples/target/generated-pdfs from earlier commands — on a clean checkout, nothing, and the cut aborts mid-flight. Step 4 now regenerates the catalogue first, with clean, so the published site is a function of the tag rather than of the maintainer's shell history. It runs after the pom bump and the GH_BASE rewrite, so version-stamped renders carry the new version. ShowcaseSync copied but never removed, so an example that was renamed or deleted kept its artifact live on GitHub Pages indefinitely — reachable by URL, absent from the manifest, rendered from source that no longer exists. It now clears the three output trees first. Three documents went with it: invoice-custom-theme, whose example was removed, and invoice.pdf / proposal.pdf, which no example has written since June. Only files are deleted, not directories: git tracks no empty directory, the copy recreates what it needs, and removing them is what makes this fail on Windows with AccessDeniedException. Eight generated artifacts had no ShowcaseMetadata entry, so lookup fell back to a filename-derived title, a generic description and a link to the examples root — a placeholder card. Two of them were the flagships 2.1.x exists to show, social-card and linkedin-carousel. The manifest now carries 90 cards and no placeholders. EngineDeckV2Example, which renders the deck the README banner is cut from, was never in GenerateAllExamples despite being linked from the README and covered by a snapshot test; registering it made it the eighth. invoice() and proposal() hardcoded their producing example, so the two v2 entries could not name theirs. Both now take the class like cv(), letter(), feature() and flagship() already do. Five committed previews were materially stale. pdf-chrome.pdf is the visible one: the whole body is drawn at low alpha with the DRAFT watermark bleeding through every panel, where a fresh render is solid. Staleness was decided by rendering both copies and comparing pixels — the five differ by 11.9 to 36.4 mean channel delta, the other twenty-one by less than 0.16, which is the date stamp in the corner and nothing else. Eleven committed binaries totalling 9.01 MiB are referenced by no file in the repository — assets/Overview.png alone is 5.8 MiB. The .gitignore allowlist still whitelisted docs/assets, docs/showcase and site/, three trees with no tracked file between them. * docs(changelog): record the showcase and asset regeneration in v2.1.1 * build(release): give the Maven banner a PDF, and make the smoke test assert The banner deck never reached the site. GenerateAllExamples called only MavenBannerPptxExample.generate(), which writes flagships/maven-banner.pptx, while the class also exposes generatePdf(). ShowcaseSync walks .pdf files, keys one card per PDF, and copies a .pptx only as that PDF's same-named companion — so a deck with no PDF twin lands in target and stops there, and the metadata entry written for it goes unused. The banner appeared in web/examples.json zero times. Generating the PDF first puts it on the site: the sync now reports 91 PDFs and 8 PPTX twins where it reported 90 and 7. everyGeneratedDeckHasAPdfTwin states that invariant so the next deck cannot repeat it. The smoke test around it asserted nothing — its own comment said "at least one PDF should have been written" above assertThat(true).isTrue(). It now reads the output tree: PDFs exist, every deck has its twin, and the catalogue spans templates, features and flagships rather than one corner of it. ShowcaseSync collected the PDF list after clearing the published trees, so a generation run that succeeded while writing nothing would have deleted the whole site and written an empty manifest, with the failure visible only once the site was live. The list is now collected first and an empty one aborts before anything is removed.
1 parent 8320aea commit d615214

51 files changed

Lines changed: 282 additions & 172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ render-pdf/logs/
4545
*.pdf
4646
# Allow PDF previews that are committed README assets.
4747
!assets/readme/**/*.pdf
48-
# Allow PDF previews that ship with the GitHub Pages showcase site.
49-
!docs/assets/**/*.pdf
50-
!docs/showcase/**/*.pdf
51-
# Same whitelist for the Next.js showcase site under site/ — 53 PDFs
52-
# mirrored from docs/showcase by Sync-SiteShowcase, plus 3 Playground
53-
# preview PDFs (hello/invoice/cv) bundled with site/public/previews/.
54-
!site/public/showcase/**/*.pdf
55-
!site/public/previews/*.pdf
5648
# Same whitelist for the live GitHub Pages showcase under web/. The showcase
5749
# moved out of docs/ into web/ but this list was not updated, so every newly
5850
# added example PDF was silently ignored and 404'd on the deployed site.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ follow semantic versioning; release dates are ISO 8601.
2222
- **`graph-compose-render-pptx` declares PDFBox.** It compiles against
2323
`org.apache.pdfbox` types while declaring only `fontbox`, taking the rest
2424
transitively; the resolved version is unchanged.
25+
- **The release publishes the showcase it just built.** `cut-release.ps1` never
26+
ran `GenerateAllExamples`, so the site was synced from whatever happened to be
27+
in `examples/target/generated-pdfs` — nothing at all on a clean checkout, which
28+
aborted the cut. Step 4 regenerates the catalogue first.
29+
- **A removed example stops being published.** `ShowcaseSync` copied but never
30+
deleted, so an artifact whose example was renamed or removed stayed live on the
31+
site indefinitely, reachable by URL and absent from the manifest. Three such
32+
documents are gone.
33+
- **Every generated document has a showcase card.** Eight artifacts had no
34+
metadata entry and published as filename-derived placeholders linking the
35+
examples root — among them both flagships the 2.1 line exists to show.
36+
`EngineDeckV2Example`, which renders the deck the README banner is cut from,
37+
was never wired into the example runner at all.
38+
- **Five committed previews were re-rendered.** The largest, the PDF-chrome
39+
preview, was drawn at low alpha throughout with the watermark bleeding through
40+
every panel. Eleven committed binaries that nothing references, 9 MiB of them,
41+
are removed.
2542
- **The release script owns the README release-status block.** It was a
2643
hand-edit the script only validated, and the validation demanded the *target*
2744
version — so between releases `develop` had to advertise an unpublished version

assets/GraphComposeCover.png

-1.33 MB
Binary file not shown.

assets/Overview.png

-5.77 MB
Binary file not shown.

assets/readme/GraphComposeLogo_final.svg

Lines changed: 0 additions & 60 deletions
This file was deleted.
-154 KB
Binary file not shown.

assets/readme/cv-layout-debug.png

-491 KB
Binary file not shown.

assets/readme/cv-preview-clean.png

-455 KB
Binary file not shown.
-112 Bytes
Binary file not shown.
-24 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)