renovatebot/renovate

Support vendored major upgrades for Go

Ouverte

#21 010 ouverte le 17 mars 2023

 (9 commentaires) (20 réactions) (0 personne assignée)TypeScript (1 916 forks)batch import
help wantedmanager:gomodpriority-3-medium

Métriques du dépôt

Stars
 (14 066 étoiles)
Métriques de merge PR
 (Merge moyen 2j 23h) (339 PRs mergées en 30 j)

Description

What would you like Renovate to be able to do?

Update major versions in projects that have Go vendoring enabled.

Eg. github.com/google/go-github/v48 to github.com/google/go-github/v50

Reproduction repository: https://gitlab.com/hugoboos/renovate-go-update-import

Related discussion: https://github.com/renovatebot/renovate/discussions/20996

If you have any ideas on how this should be implemented, please tell us here.

At the moment Renovate updates go.mod. This should be done by the mod tool. This tool is already being used by Renovate. Only the order should be changed.

  1. Run mod to change the import paths
  2. Run go mod tidy, this will update go.mod. Possible that version is different from that Renovate selected.
  3. Change the version in go.mod for the updated package.
  4. Run go mod tidy
  5. Run go mod vendor
  6. Commit

Is this a feature you are interested in implementing yourself?

No

Guide contributeur