Post-Update Options
You might be interested in the following postUpdateOptions:
gomodTidy- if you'd like Renovate to rungo mod tidyafter every update before raising the PR- This is implicitly enabled for major updates if the user has enabled the option
gomodUpdateImportPaths
- This is implicitly enabled for major updates if the user has enabled the option
gomodTidy1.17- if you'd like Renovate to rungo mod tidy -compat=1.17after every update before raising the PRgomodTidyE- if you'd like Renovate to rungo mod tidy -eafter every update before raising the PRgomodUpdateImportPaths- if you'd like Renovate to update your source import paths on major updates before raising the PRgomodMassage- to enable massaging of allreplacestatements prior to runninggoso that they will be ignored
When Renovate is running using binarySource=docker (such as in the Mend Renovate App) then it will pick the latest compatible version of Go to run, i.e. the latest 1.x release.
Even if the go.mod has a version like go 1.14, Renovate will treat it as a ^1.14 constraint and not =1.14.
Indirect updates are disabled by default. To enable them, add a package rule such as:
{
"packageRules": [
{
"matchManagers": ["gomod"],
"matchDepTypes": ["indirect"],
"enabled": true
}
]
}
Private Modules Authentication
Before running the go commands to update the go.sum, Renovate exports git insteadOf directives in environment variables.
The following logic is executed prior to "artifacts" updating:
The token from the hostRules entry matching hostType=github and matchHost=api.github.com is added as the default authentication for github.com.
For those running against github.com, this token will be the default platform token.
Next, all hostRules with both a token or username/password and matchHost will be fetched, except for any github.com one from above.
Rules from this list are converted to environment variable directives if they match any of the following characteristics:
- No
hostTypeis defined, or hostTypeisgo, orhostTypeis a platform (github,gitlab,azure, etc.)