renovate/lib/modules/manager/gomod
Tobias Kongsvik a340830ee6
fix(gomod): Use correct major version to update go import paths (#20140)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-02-23 11:23:40 +00:00
..
__fixtures__ refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00
__snapshots__ fix(manager/gomod): resolve multi-line indirect dependencies (#19442) 2022-12-16 11:40:36 +00:00
artifacts.spec.ts fix(gomod): Use correct major version to update go import paths (#20140) 2023-02-23 11:23:40 +00:00
artifacts.ts fix(gomod): Use correct major version to update go import paths (#20140) 2023-02-23 11:23:40 +00:00
extract.spec.ts feat(gomod): directive versioning (#19453) 2022-12-17 08:12:57 +01:00
extract.ts refactor: PackageFile -> PackageFileContent (#20502) 2023-02-19 12:43:48 +00:00
index.ts refactor: convert ProgrammingLanguage to union type (#18748) 2022-11-05 08:49:57 +00:00
readme.md feat(gomod): support -e option (#20199) 2023-02-07 14:00:16 +01:00
types.ts refactor(manager/go): make multiline parsing a function (#17074) 2022-08-09 19:51:43 +00:00
update.spec.ts feat(manager/gomod): update indirect dependencies for Go Modules (#19431) 2022-12-15 18:55:08 +00:00
update.ts fix(gomod): Don't append indirect mark twice (#20479) 2023-02-20 14:51:22 +00:00

You might be interested in the following postUpdateOptions:

  1. gomodTidy - if you'd like Renovate to run go mod tidy after every update before raising the PR
    1. This is implicitly enabled for major updates if the user has enabled the option gomodUpdateImportPaths
  2. gomodTidy1.17 - if you'd like Renovate to run go mod tidy -compat=1.17 after every update before raising the PR
  3. gomodTidyE - if you'd like Renovate to run go mod tidy -e after every update before raising the PR
  4. gomodUpdateImportPaths - if you'd like Renovate to update your source import paths on major updates before raising the PR
  5. gomodMassage - to enable massaging of all replace statements prior to running go so that they will be ignored

When Renovate is running using binarySource=docker (such as in the hosted 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
    }
  ]
}