mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-23 22:16:48 +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.
33 lines
1007 B
Go
33 lines
1007 B
Go
// Package ollama provides variant tagging for Ollama releases.
|
|
//
|
|
// Ollama publishes GPU accelerator builds: -rocm (AMD), -jetpack5
|
|
// and -jetpack6 (NVIDIA Jetson).
|
|
package ollamadist
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/webinstall/webi-installers/internal/storage"
|
|
)
|
|
|
|
// TagVariants tags ollama-specific build variants.
|
|
func TagVariants(assets []storage.Asset) {
|
|
for i := range assets {
|
|
lower := strings.ToLower(assets[i].Filename)
|
|
for _, v := range []string{"rocm", "jetpack5", "jetpack6"} {
|
|
if strings.Contains(lower, "-"+v) {
|
|
assets[i].Variants = append(assets[i].Variants, v)
|
|
}
|
|
}
|
|
// Ollama-darwin.zip (capital O) is the macOS .app bundle.
|
|
// Installable by Go (extract .app), but not in legacy cache.
|
|
if strings.HasPrefix(assets[i].Filename, "Ollama-") {
|
|
assets[i].Variants = append(assets[i].Variants, "app")
|
|
}
|
|
// ollama-darwin is a universal2 fat binary (arm64 + amd64).
|
|
if assets[i].OS == "darwin" && assets[i].Arch == "" {
|
|
assets[i].Arch = "universal2"
|
|
}
|
|
}
|
|
}
|