Conversation
| All file changes produced by the commands (additions, modifications, and deletions) are captured via `git status` and committed by Renovate. | ||
| This makes `customUpdateCommands` well-suited for tools like the [Backstage CLI](https://backstage.io/docs/tooling/cli/commands/#versionsbump), which updates `backstage.json`, `package.json`, `yarn.lock`, and other files in a single invocation. | ||
|
|
||
| Each command must match at least one of the patterns defined in [`allowedCommands`](./self-hosted-configuration.md#allowedcommands) (a global-only configuration option) in order to be executed. |
There was a problem hiding this comment.
Might be worth keeping a similar note to what we have re Post-upgrade tasks are blocked by default for security reasons ...?
There was a problem hiding this comment.
We haven't such a note in postUpgradeTasks, but we can add such one to allowedCommands
| try { | ||
| logger.trace({ cmd: compiledCmd }, 'Executing update command'); | ||
|
|
||
| const execOpts: ExecOptions = { |
There was a problem hiding this comment.
Can we keep the same warning as we have in lib/workers/repository/update/branch/execute-post-upgrade-commands.ts?
There was a problem hiding this comment.
Do you mean?
That should be rather added to the documentation rather code.
jamietanna
left a comment
There was a problem hiding this comment.
Few comments, but happy with the overall design and approach - especially as it's very close code wise to how we're doing postUpgradeTasks (which I know is intentional)
|
IMO, let's keep the duplication in place between them - I prefer the "rule of 3" rather than "don't repeat yourself" - there are a few things that are different between them, and we won't know until - maybe - we add a third thing like this where the duplication is and what's special to each case |
Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>
Changes
This is a draft for a new
customUpdateCommandsconfiguration. Which if applied overwrites the replacement logic.This iteration also supports
lockfileMaintenanceContext
This is useful in combination with CustomManager, if the a simply replacing is not enough as external tooling could use the packageFile as state ( which version is currently applied )
Please select one of the following:
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
The public repository:
TODOs: