mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-03 21:33:36 +09:00
tools/bump: resolve go.mod targets before calling go get
`go get -u` takes the highest semver the proxy offers: a fork's stray tag sorting above its real branch, or a module that has moved and kept tagging under the old path. Resolving first refuses both, and names the compare link for every version that does move.
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ func planLines(ctx context.Context, r *repo) []string {
|
||||
|
||||
if version, err := oapiVersion(r); err != nil { //nolint:noinlineerr
|
||||
lines = append(lines, "oapi-codegen: "+err.Error())
|
||||
} else if latest, err := latestVersion(ctx, "github.com/oapi-codegen/oapi-codegen/v2"); err != nil { //nolint:noinlineerr
|
||||
} else if latest, err := latestVersion(ctx, "github.com/oapi-codegen/oapi-codegen/v2", version); err != nil { //nolint:noinlineerr
|
||||
lines = append(lines, "oapi-codegen: "+err.Error())
|
||||
} else {
|
||||
lines = append(lines, gap("Makefile oapi-codegen", version, latest))
|
||||
@@ -135,7 +135,7 @@ func planLockstep(ctx context.Context, r *repo) []string {
|
||||
want := have
|
||||
|
||||
if pair.target == "" {
|
||||
if latest, err := latestVersion(ctx, pair.owner); err == nil { //nolint:noinlineerr
|
||||
if latest, err := latestVersion(ctx, pair.owner, have); err == nil { //nolint:noinlineerr
|
||||
want = latest
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user