mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-19 03:56:16 +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.
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
// Package fish provides variant tagging for fish shell releases.
|
|
//
|
|
// Fish publishes .pkg macOS installers alongside the standard archives.
|
|
// It also includes a source tarball (fish-{version}.tar.xz) as an
|
|
// uploaded release asset — no OS or arch in the name, indistinguishable
|
|
// from binaries by content_type. We tag it explicitly as "source".
|
|
package fishdist
|
|
|
|
import "github.com/webinstall/webi-installers/internal/storage"
|
|
|
|
// TagVariants tags fish-specific build variants.
|
|
func TagVariants(assets []storage.Asset) {
|
|
for i := range assets {
|
|
if assets[i].Format == ".pkg" {
|
|
assets[i].Variants = append(assets[i].Variants, "installer")
|
|
}
|
|
// Source tarball: no OS or arch detected by the classifier.
|
|
if assets[i].OS == "" && assets[i].Arch == "" {
|
|
assets[i].Variants = append(assets[i].Variants, "source")
|
|
}
|
|
// fish-*.app.zip is a macOS universal binary. Fish's naming puts
|
|
// arch in Linux filenames (e.g. fish-*-aarch64.tar.xz) but not in
|
|
// macOS .app.zip. Tag as x86_64; darwin waterfall serves arm64.
|
|
if assets[i].OS == "darwin" && assets[i].Arch == "" && assets[i].Format == ".app.zip" {
|
|
assets[i].Arch = "x86_64"
|
|
}
|
|
}
|
|
}
|