diff --git a/cmd/comparecache/main.go b/cmd/comparecache/main.go index 5a17b78..2dbc8a9 100644 --- a/cmd/comparecache/main.go +++ b/cmd/comparecache/main.go @@ -556,6 +556,11 @@ func normalizeVersionFunc(pkg string) func(string) string { } return v } + case "watchexec": + return func(v string) string { + // watchexec monorepo: cli-v1.20.5 → v1.20.5 + return strings.TrimPrefix(v, "cli-") + } case "go": return func(v string) string { // Go: go1.10 → 1.10.0 (pad to 3 parts) diff --git a/internal/classifypkg/classifypkg.go b/internal/classifypkg/classifypkg.go index 2fe25a6..c7effe9 100644 --- a/internal/classifypkg/classifypkg.go +++ b/internal/classifypkg/classifypkg.go @@ -231,6 +231,9 @@ func classifyGitHub(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]st version := rel.TagName if tagPrefix != "" { + if !strings.HasPrefix(version, tagPrefix) { + continue // skip tags from other packages in monorepos + } version = strings.TrimPrefix(version, tagPrefix) } diff --git a/jq/releases.conf b/jq/releases.conf index 73b3ef7..332c43a 100644 --- a/jq/releases.conf +++ b/jq/releases.conf @@ -1,3 +1,4 @@ source = github owner = stedolan repo = jq +version_prefixes = jq- diff --git a/watchexec/releases.conf b/watchexec/releases.conf index 947645f..421431d 100644 --- a/watchexec/releases.conf +++ b/watchexec/releases.conf @@ -1,3 +1,4 @@ source = github owner = watchexec repo = watchexec +tag_prefix = cli-