Commit d615214
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
File tree
- assets
- readme
- examples
- v1.5
- examples/src
- main/java/com/demcha/examples
- support
- test/java/com/demcha/examples
- scripts
- web
- showcase
- pdf
- features
- chrome
- shapes
- tables
- text
- themes
- title
- flagships/default
- templates
- invoice
- proposal
- pptx/flagships/default
- screenshots
- features
- chrome
- themes
- flagships/default
- templates
- invoice
- proposal
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 48 | | |
57 | 49 | | |
58 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
25 | 42 | | |
26 | 43 | | |
27 | 44 | | |
| |||
Binary file not shown.
Binary file not shown.
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments