mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-19 23:26:35 +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.
26 lines
864 B
Go
26 lines
864 B
Go
// Package gitlabsrc fetches source archives from GitLab releases.
|
|
//
|
|
// Some packages are installed from the auto-generated source archives
|
|
// rather than attached binary links. This package fetches releases and
|
|
// exposes the source archive URLs.
|
|
//
|
|
// Use [gitlab] for packages that use attached release links (binaries).
|
|
package gitlabsrc
|
|
|
|
import (
|
|
"context"
|
|
"iter"
|
|
"net/http"
|
|
|
|
"github.com/webinstall/webi-installers/internal/releases/gitlab"
|
|
)
|
|
|
|
// Fetch retrieves releases from a GitLab instance.
|
|
// Paginates automatically, yielding one batch per API page.
|
|
//
|
|
// Callers should use [gitlab.Release.Assets.Sources] rather than
|
|
// [gitlab.Release.Assets.Links].
|
|
func Fetch(ctx context.Context, client *http.Client, baseURL, project string, auth *gitlab.Auth) iter.Seq2[[]gitlab.Release, error] {
|
|
return gitlab.Fetch(ctx, client, baseURL, project, auth)
|
|
}
|