royteeuwen opened a new pull request, #40:
URL: https://github.com/apache/sling-org-apache-sling-committer-cli/pull/40
Promoting a release also requires updating the website, which `finalize` did
not do. `UpdateLocalSiteCommand` already edited `releases.md` and
`downloads.tpl`, but it only printed a `git diff` — so nothing it produced ever
landed.
`finalize` now orchestrates that command as step 6/6, reusing its editing
and commit/push helpers rather than reimplementing them, following the existing
`planDistRelease` / `publishToDistRelease` pattern. The checkout is cloned from
gitbox so the same ASF credentials that already commit to `dist.apache.org` can
push.
### Downloads entries are matched on the artifact id
Matching on the display name silently did nothing for roughly a third of
releases, because the name on the downloads page regularly differs from the
released component name:
| Release | `downloads.tpl` entry |
|---|---|
| Commons Mime | Commons Mime **Type Service** |
| Tracer | **Log** Tracer |
| Event **Impl** | Event |
| **Webconsole** Security Provider | **Web Console** Security Provider |
| Installer Configuration **Factory** | Installer Configuration **Support** |
| Testing OSGi Mock | Testing OSGi Mock **Core** + **JUnit 4** + **JUnit 5**
(3 entries) |
The old regex also excluded digits, so `I18n`, `osgi-mock.junit4/5`,
`metrics-rrd4j` and `auth.saml2` could never match, and the change count it
returned was discarded by the caller — so the no-op was invisible.
Entries are now keyed on the artifact id, which is also what the site's own
`renovate.json` keys on. Artifact ids come from the staged POMs, or from the
released POMs in `dist/release` once the staging repository has been dropped,
so this works both before and after promotion. Since a release name maps to its
child modules only through the `<parent>` chain, that resolution reuses
`PomParser` instead of guessing.
### Only entries on the same major version are rewritten
`dist/release` keeps several major streams published side by side while the
downloads page lists a single, latest-major entry per artifact —
`resourceresolver` is listed at `2.0.2` while `1.12.16` is still distributed.
Nine artifacts are currently in that state (`engine`, `resourceresolver`,
`servlets.resolver`, `sling-mock*`, …). Matching on the artifact id alone would
therefore have turned a Resource Resolver `1.12.18` maintenance release into a
**downgrade** of the `2.x` entry. A maintenance release of an older line now
reports that the page tracks another major version and touches nothing.
Composite versions (`4.1.0-1.86.0`, `7.0.5-2.8.2`) and the Groovy
`${starterVersion}` interpolation are handled too.
An artifact with no entry at all is reported so it can be added by hand —
which is what the release guide asks for when a brand new module is released.
### The news page stays manual
A new `release update-news` command adds an announcement entry. It is
deliberately *not* part of `finalize`, since the release guide only asks for a
news entry when a release warrants an announcement.
### Notes
- The display-name based `updateDownloads` is removed in the second commit;
it had no callers left, since the `--release` path also resolves artifact ids.
- `FinalizeCommandTest` was cloning the real `sling-site` and attempting an
actual push to gitbox — it "passed" only because the step warns rather than
fails. That is now stubbed, so no test touches the network.
- A step 6 failure is warned about but does not fail `finalize`: everything
irreversible has already succeeded by that point.
- 158 tests pass; `mvn clean verify` is green.
The matching rules were validated against the live `downloads.tpl` and the
last 45 releases from `releases.md` before and after the change.
Companion docs update: apache/sling-site
`docs/release-management-finalize-website`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]