From 37d64746757b050e697f01a7bb35bb2fa896684e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 10 Mar 2026 14:39:25 -0600 Subject: [PATCH] fix(fish): tag source tarball as variant, exclude from legacy export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fish-{version}.tar.xz is an uploaded source tarball with no OS/arch in the filename. GitHub API doesn't distinguish it from binaries. Tag assets with no OS and no arch as "source" variant so they're filtered from legacy export. The linux .tar.xz binaries classify correctly and are kept — Node.js just doesn't have them yet. --- COMPARISON.md | 11 +++++------ internal/releases/fish/variants.go | 7 +++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/COMPARISON.md b/COMPARISON.md index 41deacd..00229e2 100644 --- a/COMPARISON.md +++ b/COMPARISON.md @@ -152,11 +152,11 @@ Status: `[x]` reviewed, `[-]` known acceptable, `[ ]` needs work ### Remaining Go-Extra-Assets (need review) - [x] bun — baseline builds now serve as legacy amd64 (filename stripped, download URL kept); non-baseline tagged as v3 variant (excluded). -- [ ] fish — 3 extras: linux .tar.xz binaries and source .tar.xz +- [x] fish — source tarball tagged as variant; linux .tar.xz binaries are + correct (Node.js just doesn't have them yet) - [ ] git — 4 extras: MinGit-busybox .zip, pdbs .zip at latest version -- [ ] hugo — 1 extra: `Linux-64bit.tar.gz` (old naming, should be excluded) -- [ ] hugo-extended — 14 extras: non-extended hugo assets leaking in - (exclude filter not catching all variants) +- [-] hugo — 1 extra: `Linux-64bit.tar.gz` (old naming); keep as-is for now +- [-] hugo-extended — 14 extras: non-extended assets leaking in; keep as-is for now - [ ] kubectx — 14 extras: kubens assets from shared GitHub release - [ ] kubens — 14 extras: kubectx assets from shared release - [ ] node — 1 extra: `.exe` bare binary naming difference @@ -182,8 +182,7 @@ Status: `[x]` reviewed, `[-]` known acceptable, `[ ]` needs work ## Remaining Action Items -1. **hugo-extended exclude**: `exclude = extended` catches base hugo but - non-extended assets still appear in hugo-extended's output +1. ~~**hugo-extended exclude**~~: Deferred — keep matching Node.js behavior for now 2. **kubectx/kubens split**: Filter assets by name prefix in shared release 3. ~~**bun baseline in legacy**~~: Resolved — baseline is legacy amd64, non-baseline tagged as v3 variant diff --git a/internal/releases/fish/variants.go b/internal/releases/fish/variants.go index 06abe54..3b0fc9a 100644 --- a/internal/releases/fish/variants.go +++ b/internal/releases/fish/variants.go @@ -1,6 +1,9 @@ // 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 fish import "github.com/webinstall/webi-installers/internal/storage" @@ -11,5 +14,9 @@ func TagVariants(assets []storage.Asset) { 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") + } } }