From 1e58622d3d32c78df4494703782de1b43ce1b5fb Mon Sep 17 00:00:00 2001 From: Derek Miller <1340081+derek-miller@users.noreply.github.com> Date: Tue, 10 Nov 2026 07:42:36 -0600 Subject: [PATCH] feat(drivercentral): a tag build's drivercentral artifact is the whole DriverCentral upload --- template/.github/workflows/build.yml.jinja | 2 ++ template/CONTRIBUTING.md.jinja | 14 ++++++++------ template/Makefile.jinja | 17 ++++++++++++----- template/resources/drivercentral/README.md | 2 +- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/template/.github/workflows/build.yml.jinja b/template/.github/workflows/build.yml.jinja index 3b413ec..061269a 100644 --- a/template/.github/workflows/build.yml.jinja +++ b/template/.github/workflows/build.yml.jinja @@ -6,6 +6,8 @@ on: tags: ['v*'] pull_request: branches: [main, master] + # Run on a tag again from the Actions tab once its artifacts have expired. + workflow_dispatch: permissions: contents: read diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja index 3ea9223..2ddb148 100644 --- a/template/CONTRIBUTING.md.jinja +++ b/template/CONTRIBUTING.md.jinja @@ -308,12 +308,14 @@ per-driver Lua). `.zip` sits alongside them and contains `c4z/` and `docs/` only: `source/` is the driver's unencrypted Lua, which an encrypted driver must not ship. -`dist/drivercentral/` also holds the DriverCentral listing's text, pasted over -the listing's own at each upload. `revisions.html` is the Revisions tab: every -released `CHANGELOG.md` section as the DriverCentral build shows it. -`description.html` is the description, made from `description.md` in -`resources/drivercentral/`. Both come with the drivercentral CI artifact, -outside the zip. +`dist/drivercentral/listing/` holds what a DriverCentral upload needs beyond the +zip and the PDFs. `description.html` is the listing's description, made from +`description.md` in `resources/drivercentral/`. `revisions.html` is the +Revisions tab, every released `CHANGELOG.md` section as the DriverCentral build +shows it. The product card, the banners and the listing photos are copied from +`resources/drivercentral/`. A tag build's drivercentral CI artifact is the whole +upload. When it has expired, run the Build workflow on the tag again from the +Actions tab. Step 1 rewrites tracked files in place. Formatting covers `tools/*.py`, all Lua under `drivers/`, `src/`, `test/`, `tools/` and `vendor/`, and every Markdown diff --git a/template/Makefile.jinja b/template/Makefile.jinja index 1b12d5a..7dbc9db 100644 --- a/template/Makefile.jinja +++ b/template/Makefile.jinja @@ -197,17 +197,24 @@ docs-readme: preprocess $(VENV_STAMP) build/$(README_BUILD)/drivers/$(README_DRIVER)/www/documentation/index.md README.md {% endif %} -# The DriverCentral listing's Revisions tab and description, pasted at each -# upload. They sit beside the zip integrators download, not in it. +# What a DriverCentral upload needs beyond the zip and the PDFs: the listing's +# description, Revisions tab and images. It sits beside the zip integrators +# download, not in it. docs-drivercentral: preprocess $(VENV_STAMP) - @mkdir -p dist/drivercentral + @rm -rf dist/drivercentral/listing && mkdir -p dist/drivercentral/listing $(VENV_PY) tools/docs.py revisions \ build/drivercentral/{% if readme_driver_slug == "root" %}documentation{% else %}drivers/$(README_DRIVER)/www/documentation{% endif %}/index.md \ - dist/drivercentral/revisions.html + dist/drivercentral/listing/revisions.html @if [ -f resources/drivercentral/description.md ]; then \ $(VENV_PY) tools/docs.py description \ - resources/drivercentral/description.md dist/drivercentral/description.html; \ + resources/drivercentral/description.md dist/drivercentral/listing/description.html; \ fi + @cd resources/drivercentral 2>/dev/null || exit 0; \ + for f in product-card-300x300.png banners/*.png photos/*.png; do \ + [ -f "$$f" ] || continue; \ + mkdir -p "$(CURDIR)/dist/drivercentral/listing/$$(dirname "$$f")"; \ + cp "$$f" "$(CURDIR)/dist/drivercentral/listing/$$f"; \ + done docs-html: $(VENV_STAMP) @for build in $(DISTRIBUTIONS); do \ diff --git a/template/resources/drivercentral/README.md b/template/resources/drivercentral/README.md index 29e5092..37e9188 100644 --- a/template/resources/drivercentral/README.md +++ b/template/resources/drivercentral/README.md @@ -12,7 +12,7 @@ Marketing images for the driver's DriverCentral listing. Each banner and photo i `assets/` holds what the pages share: the Finite Labs logo, `scene.js`, which draws the banners' art, and the brand's logo as `brand-mark.png`. -`description.md` is the listing's description, written as below. `make build` turns it into `dist/drivercentral/description.html`, with `##` as the editor's section headings, for pasting into the listing. The Revisions tab comes from the build too, as `dist/drivercentral/revisions.html`. +`description.md` is the listing's description, written as below. `make build` turns it into `dist/drivercentral/listing/description.html`, with `##` as the editor's section headings, for pasting into the listing. The Revisions tab comes from the build too, as `listing/revisions.html`, and the build copies the product card, banners and listing photos beside them. A tag build's drivercentral artifact holds the whole upload. ## Writing the description