ref(watchexec): move cli- prefix stripping from config to code

The cli- prefix is a watchexec-specific monorepo artifact, not a generic
config concern. Move it to internal/releases/watchexec/versions.go
alongside other per-package normalizers (git, lf).
This commit is contained in:
AJ ONeal
2026-03-10 23:11:14 -06:00
parent 07d5f36ed4
commit f963b35e01
3 changed files with 21 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ import (
"github.com/webinstall/webi-installers/internal/releases/node"
"github.com/webinstall/webi-installers/internal/releases/ollama"
"github.com/webinstall/webi-installers/internal/releases/pwsh"
"github.com/webinstall/webi-installers/internal/releases/watchexec"
"github.com/webinstall/webi-installers/internal/releases/xcaddy"
"github.com/webinstall/webi-installers/internal/releases/zigdist"
"github.com/webinstall/webi-installers/internal/storage"
@@ -100,6 +101,8 @@ func NormalizeVersions(pkg string, assets []storage.Asset) {
assets[i].Version = "0." + v[1:] + ".0"
}
}
case "watchexec":
watchexec.NormalizeVersions(assets)
}
}

View File

@@ -0,0 +1,18 @@
package watchexec
import (
"strings"
"github.com/webinstall/webi-installers/internal/storage"
)
// NormalizeVersions strips the "cli-" prefix from watchexec version strings.
//
// Watchexec transitioned to a monorepo with cli-prefixed tags (cli-v1.20.0)
// while older releases used plain tags (v1.20.6). Both are valid releases;
// the prefix is just a tag namespace, not part of the version.
func NormalizeVersions(assets []storage.Asset) {
for i := range assets {
assets[i].Version = strings.TrimPrefix(assets[i].Version, "cli-")
}
}

View File

@@ -1,4 +1,3 @@
source = github
owner = watchexec
repo = watchexec
version_prefixes = cli-