mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-19 08:26:39 +00:00
fix(git): normalize .windows.N version suffix
Git for Windows uses tags like v2.53.0.windows.1. Node.js strips ".windows.1" and replaces ".windows.N" (N>1) with ".N". Add NormalizeVersions to the git package and wire it into the classify pipeline. Also add version normalization to comparecache so the comparison uses canonical versions for both caches. Remaining git diffs: data freshness (.windows.2 releases Go hasn't fetched) and RC versions in Go that live doesn't have.
This commit is contained in:
@@ -47,6 +47,7 @@ func Package(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]storage.A
|
||||
}
|
||||
|
||||
TagVariants(pkg, assets)
|
||||
NormalizeVersions(pkg, assets)
|
||||
assets = ApplyConfig(assets, conf)
|
||||
return assets, nil
|
||||
}
|
||||
@@ -85,6 +86,15 @@ func classifySource(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]st
|
||||
}
|
||||
}
|
||||
|
||||
// NormalizeVersions applies package-specific version normalization.
|
||||
// For example, Git for Windows strips ".windows.N" from version strings.
|
||||
func NormalizeVersions(pkg string, assets []storage.Asset) {
|
||||
switch pkg {
|
||||
case "git":
|
||||
git.NormalizeVersions(assets)
|
||||
}
|
||||
}
|
||||
|
||||
// TagVariants applies package-specific variant tags to classified assets.
|
||||
// Each case delegates to a per-installer package under internal/releases/.
|
||||
func TagVariants(pkg string, assets []storage.Asset) {
|
||||
|
||||
Reference in New Issue
Block a user