mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-24 17:42:55 +00:00
Rewrites the Node.js release classification pipeline in Go. webicached fetches upstream releases (GitHub, Gitea, GitLab, HashiCorp, custom sources), classifies assets by OS/arch/variant, and writes legacy-format JSON caches compatible with the existing webinstall.dev API. Git-clone packages emit git_tag and git_commit_hash from real repo clones — no fabricated refs.
19 lines
550 B
Go
19 lines
550 B
Go
package watchexecdist
|
|
|
|
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-")
|
|
}
|
|
}
|