mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-18 06:36:37 +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.
21 lines
691 B
Go
21 lines
691 B
Go
package nodedist
|
|
|
|
import "github.com/webinstall/webi-installers/internal/storage"
|
|
|
|
// TagVariants tags node-specific build variants.
|
|
//
|
|
// The bare .exe is just node.exe without npm — too minimal to be useful.
|
|
// The .msi is a Windows GUI installer — webi uses the .zip instead.
|
|
// The .pkg is a macOS installer package — webi uses the .tar.gz instead.
|
|
// Both are tagged as "installer" so ExportLegacy drops them.
|
|
func TagVariants(assets []storage.Asset) {
|
|
for i := range assets {
|
|
switch assets[i].Format {
|
|
case ".exe":
|
|
assets[i].Variants = append(assets[i].Variants, "bare-exe")
|
|
case ".msi", ".pkg":
|
|
assets[i].Variants = append(assets[i].Variants, "installer")
|
|
}
|
|
}
|
|
}
|