From f9f00452595f34026f6fa85f69407ccd472e31d7 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 10 Mar 2026 00:33:05 -0600 Subject: [PATCH] fix: handle GitHub source-tarball packages (serviceman, aliasman, duckdns.sh) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a GitHub release has no binary assets, fall back to tarball_url and zipball_url. These are source distributions (platform-independent), marked with extra=source. - serviceman: 12 distributables (6 releases × tar.gz + zip) - aliasman: 8 distributables (4 releases × tar.gz + zip) - duckdns.sh: 6 distributables (3 releases × tar.gz + zip) Total: 170,213 rows across 116 packages (no more zeros). --- cmd/classify/main.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cmd/classify/main.go b/cmd/classify/main.go index bdb5f76..27a3432 100644 --- a/cmd/classify/main.go +++ b/cmd/classify/main.go @@ -226,6 +226,8 @@ type ghRelease struct { Draft bool `json:"draft"` PublishedAt string `json:"published_at"` Assets []ghAsset `json:"assets"` + TarballURL string `json:"tarball_url"` + ZipballURL string `json:"zipball_url"` } type ghAsset struct { @@ -302,6 +304,35 @@ func classifyGitHub(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]Di Date: date, }) } + + // Source-tarball packages: no binary assets, distributed via + // GitHub's auto-generated tarball/zipball URLs. + if len(rel.Assets) == 0 { + if rel.TarballURL != "" { + dists = append(dists, Dist{ + Package: pkg, + Version: version, + Channel: channel, + Format: ".tar.gz", + Download: rel.TarballURL, + Filename: rel.TagName + ".tar.gz", + Date: date, + Extra: "source", + }) + } + if rel.ZipballURL != "" { + dists = append(dists, Dist{ + Package: pkg, + Version: version, + Channel: channel, + Format: ".zip", + Download: rel.ZipballURL, + Filename: rel.TagName + ".zip", + Date: date, + Extra: "source", + }) + } + } } return dists, nil }