mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-06 18:36:50 +00:00
fix: jq version prefix, watchexec monorepo tag filter
- jq: add version_prefixes = jq- to strip jq- from version strings - watchexec: add tag_prefix = cli- to filter monorepo tags correctly - classifyGitHub: skip tags not matching tag_prefix in monorepos - comparecache: add watchexec version normalization Match count: 74/106
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
source = github
|
||||
owner = stedolan
|
||||
repo = jq
|
||||
version_prefixes = jq-
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
source = github
|
||||
owner = watchexec
|
||||
repo = watchexec
|
||||
tag_prefix = cli-
|
||||
|
||||
Reference in New Issue
Block a user