mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-07 07:10:07 +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:
@@ -107,3 +107,22 @@ func TestSelector(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Detail lines are rendered as-is so a compare link stays a link. Wrapping
|
||||
// them in backticks, the way the table cells are, would turn every entry in
|
||||
// "What moved" back into text nobody can click.
|
||||
func TestDetailKeepsCompareLinks(t *testing.T) {
|
||||
link := "github.com/spf13/cobra v1.8.0 -> " +
|
||||
"[v1.9.0](https://github.com/spf13/cobra/compare/v1.8.0...v1.9.0)"
|
||||
|
||||
var sb strings.Builder
|
||||
|
||||
writeDetails(&sb, []result{{
|
||||
Area: "gomod",
|
||||
Change: change{Detail: []string{link}},
|
||||
}})
|
||||
|
||||
if got := sb.String(); !strings.Contains(got, "- "+link+"\n") {
|
||||
t.Errorf("writeDetails() did not render the link unchanged:\n%s", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user