Running post-upgrade tasks¶
Post-upgrade tasks that are executed before a commit is made by Renovate.
Post-upgrade tasks are commands that are executed by Renovate after a dependency has been updated but before the commit is created. The intention is to run any other command line tools that would modify existing files or generate new files when a dependency changes.
Each command must match at least one of the patterns defined in allowedCommands (a global-only
configuration option) in order to be executed.
Our configuration
is set up such that it can call scripts in the ./.renovate/
directory in the root that start with post-upgrade*
.
Note: make sure that the script is executable.
Examples usages:
"postUpgradeTasks": {
"commands": [
"./.renovate/post-upgrade.py '{{{ toJSON upgrades }}}'"
],
"executionMode": "branch",
"fileFilters": ["CHANGELOG.md"]
}
Or:
"postUpgradeTasks": {
"commands": [
".renovate/post-upgrade.sh \"{{{depName}}}\" \"{{{currentVersion}}}\" \"{{{newVersion}}}\""
],
"fileFilters": ["CHANGELOG.md"]
}