chore: don't include announcement bar in release notes' attachment
When building the docs site in CI on `main` (or a release branch), we
currently package up the docs site into the GitHub Release.
However, this includes the "announcement bar", which can include stale
info.
In the case where a user is looking to add a mirror for their Renovate
CLI docs[0], this means they now see an announcement bar which includes
unhelpful - and possibly outdated - information.
As noted in #44030, we can improve this to:
- not include the announcement bar when preparing the attachment for the
release
- include the announcement bar only when we're updating the docs site
To do this, we need to:
- add a new `--no-announcement` flag (which ensures the default is "do
add the announcement")
- log when we're not using announcements
- detect the environment variable when building the mkdocs site locally
This means we'll always be rebuilding the docs site (to inject the
announcement bar) which is ~16s as of a recent run.
[0]: https://www.jvt.me/posts/2024/11/19/renovate-private-docs/
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
chore(tools): handle additional error
In the case that `pdm` can't be executed, for instance if it's only
installed in a Virtualenv that's not currently active, this previously
would silently pass, even though the command had failed.
We can now make it more resilient by warning/erroring in the cases that:
- there is a timeout
- the process was killed
- the process failed to execute
Originally raised as #40987, which was closed due to the migration to
`execa` and errors being flagged as an `unhandledRejection`.
However, after b35d7c9cad, we would no
longer reject, leading to an incomplete error handling case.
As part of changes in e438887dfb, we'd
missed the fact that `tools/` would need to have the logger initialized
too.
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
As we now perform the Mkdocs build as part of the main repo, we can
now attach the docs site build into the GitHub Release artifacts as part
of our release pipeline.
For folks who are running versions behind the "bleeding edge" of
Renovate, this is very useful, as they can now grab a copy of the built
documentation for their given Renovate version.
This allows folks to take the `mkdocs-site.tgz` and upload it to static
hosting, without restoring to workarounds[0] that can make it more
difficult.
Because we're now building the docs site as part of the release, we need
to upload the built artifact to then be used by our deploy step.
As the deploy step no longer needs to build the docs site, we can
simplify this.
However, if the release hasn't occurred (because there are no commit(s)
that need a release right now) we still need to rebuild the docs site,
in case there are docs-only changes.
[0]: https://www.jvt.me/posts/2024/11/19/renovate-private-docs/
Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
As part of future changes to introduce further typings for Commander
(#40546), we need to provide stronger types as the `version` will now be
typed.
We can erase the `SemVer` type, and pass around a `string`, instead as
it's not necessary to keep.
fix(tools/json-schema): correctly set version in generated JSON Schema
In #38567 we tried to wire in the version of Renovate into the generated
JSON Schema. This unfortunately didn't work, as we don't have the
release number known at the time we're currently calling the JSON Schema
generation.
To fix this, we can make sure that at the point we're generating the
JSON Schema as part of the release process, we can wire in the version
as part of `generateSchema`.