ref(releases.conf): collapse source/owner/repo into single keys

Source type is now inferred from the primary key:
  github_repo = owner/repo   (was source=github + owner + repo)
  git_url = https://...      (was source=gittag + url)
  gitea_repo = owner/repo    (was source=gitea + owner + repo)
  hashicorp_product = name   (was source=hashicorp + product)

One-off dist sources (nodedist, zigdist, etc.) keep the explicit
source= key since they're already one-liners.

Parser still accepts the old format via the default fallback branch.
This commit is contained in:
AJ ONeal
2026-03-11 01:05:08 -06:00
parent d0801d0952
commit 0861ebc8b8
94 changed files with 159 additions and 304 deletions

View File

@@ -1,5 +1,3 @@
# Example releases.conf — uses ripgrep as a sample project.
# Copy this file into your package directory and adjust.
source = github
owner = BurntSushi
repo = ripgrep
github_repo = BurntSushi/ripgrep

View File

@@ -1,3 +1 @@
source = github
owner = BeyondCodeBootcamp
repo = aliasman
github_repo = BeyondCodeBootcamp/aliasman

View File

@@ -1,3 +1 @@
source = github
owner = mholt
repo = archiver
github_repo = mholt/archiver

View File

@@ -1,3 +1 @@
source = github
owner = wez
repo = atomicparsley
github_repo = wez/atomicparsley

View File

@@ -1,3 +1 @@
source = github
owner = wallix
repo = awless
github_repo = wallix/awless

View File

@@ -1,3 +1 @@
source = github
owner = sharkdp
repo = bat
github_repo = sharkdp/bat

View File

@@ -1,8 +1,5 @@
source = github
owner = oven-sh
repo = bun
github_repo = oven-sh/bun
tag_prefix = bun-
# non-baseline=amd64v3, -baseline=amd64
default_x86_64 = x86_64_v3
x86_64_v2 = baseline
variants = profile

View File

@@ -1,3 +1 @@
source = github
owner = caddyserver
repo = caddy
github_repo = caddyserver/caddy

View File

@@ -1,3 +1 @@
source = github
owner = cilium
repo = cilium-cli
github_repo = cilium/cilium-cli

View File

@@ -1,3 +1 @@
source = github
owner = Kitware
repo = CMake
github_repo = Kitware/CMake

View File

@@ -586,7 +586,7 @@ func fetchGPGDist(ctx context.Context, client *http.Client, rawDir, pkgName stri
}
func fetchHashiCorp(ctx context.Context, client *http.Client, rawDir, pkgName string, conf *installerconf.Conf) error {
product := conf.Extra["product"]
product := conf.Repo
if product == "" {
product = pkgName
}

View File

@@ -1,3 +1 @@
source = github
owner = kivikakk
repo = comrak
github_repo = kivikakk/comrak

View File

@@ -1,3 +1 @@
source = github
owner = sstadick
repo = crabz
github_repo = sstadick/crabz

View File

@@ -1,3 +1 @@
source = github
owner = rs
repo = curlie
github_repo = rs/curlie

View File

@@ -1,3 +1 @@
source = github
owner = dashpay
repo = dash
github_repo = dashpay/dash

View File

@@ -1,3 +1 @@
source = github
owner = dashhive
repo = dashmsg
github_repo = dashhive/dashmsg

View File

@@ -1,3 +1 @@
source = github
owner = dandavison
repo = delta
github_repo = dandavison/delta

View File

@@ -1,3 +1 @@
source = github
owner = denoland
repo = deno
github_repo = denoland/deno

View File

@@ -1,3 +1 @@
source = github
owner = dotenv-linter
repo = dotenv-linter
github_repo = dotenv-linter/dotenv-linter

View File

@@ -1,3 +1 @@
source = github
owner = therootcompany
repo = dotenv
github_repo = therootcompany/dotenv

View File

@@ -1,3 +1 @@
source = github
owner = BeyondCodeBootcamp
repo = DuckDNS.sh
github_repo = BeyondCodeBootcamp/DuckDNS.sh

View File

@@ -1,3 +1 @@
source = github
owner = sharkdp
repo = fd
github_repo = sharkdp/fd

View File

@@ -1,5 +1,3 @@
source = github
owner = eugeneware
repo = ffmpeg-static
github_repo = eugeneware/ffmpeg-static
asset_filter = ffmpeg
version_prefix = b

View File

@@ -1,3 +1 @@
source = github
owner = ffuf
repo = ffuf
github_repo = ffuf/ffuf

View File

@@ -1,4 +1,2 @@
source = github
owner = fish-shell
repo = fish-shell
github_repo = fish-shell/fish-shell
exclude = bundledpcre fish-static OpenBeta

View File

@@ -1,3 +1 @@
source = github
owner = junegunn
repo = fzf
github_repo = junegunn/fzf

View File

@@ -1,3 +1 @@
source = github
owner = cli
repo = cli
github_repo = cli/cli

View File

@@ -1,6 +1,4 @@
source = github
owner = git-for-windows
repo = git
github_repo = git-for-windows/git
asset_filter = MinGit
exclude = busybox
variants = installer

View File

@@ -1,3 +1 @@
source = github
owner = therootcompany
repo = gitdeploy
github_repo = therootcompany/gitdeploy

View File

@@ -1,4 +1,2 @@
source = github
owner = go-gitea
repo = gitea
github_repo = go-gitea/gitea
exclude = -src- -docs-

View File

@@ -1,3 +1 @@
source = github
owner = goreleaser
repo = goreleaser
github_repo = goreleaser/goreleaser

View File

@@ -1,3 +1 @@
source = github
owner = creedasaurus
repo = gprox
github_repo = creedasaurus/gprox

View File

@@ -1,3 +1 @@
source = github
owner = anchore
repo = grype
github_repo = anchore/grype

View File

@@ -1,3 +1 @@
source = github
owner = sharkdp
repo = hexyl
github_repo = sharkdp/hexyl

View File

@@ -1,5 +1,3 @@
source = github
owner = gohugoio
repo = hugo
github_repo = gohugoio/hugo
asset_filter = extended
exclude = Linux-64bit

View File

@@ -1,4 +1,2 @@
source = github
owner = gohugoio
repo = hugo
github_repo = gohugoio/hugo
exclude = extended Linux-64bit

View File

@@ -4,44 +4,46 @@
// starting with # are ignored. Keys and values are trimmed of whitespace.
// Multi-value keys are whitespace-delimited.
//
// Minimal example (covers ~60% of packages):
// The source type is inferred from the primary key:
//
// source = github
// owner = sharkdp
// repo = bat
// GitHub releases (covers ~70% of packages):
//
// github_repo = sharkdp/bat
//
// With version prefix stripping (jq tags are "jq-1.7.1"):
//
// source = github
// owner = jqlang
// repo = jq
// github_repo = jqlang/jq
// version_prefixes = jq-
//
// With filename exclusions and variant documentation:
//
// source = github
// owner = gohugoio
// repo = hugo
// github_repo = gohugoio/hugo
// exclude = _extended_ Linux-64bit
// variants = extended extended_withdeploy
//
// Monorepo with tag prefix:
//
// source = github
// owner = therootcompany
// repo = golib
// github_repo = therootcompany/golib
// tag_prefix = tools/monorel/
//
// Non-GitHub sources:
// Git tag sources (vim plugins, etc.):
//
// git_url = https://github.com/tpope/vim-commentary.git
//
// Gitea releases:
//
// gitea_repo = root/pathman
// base_url = https://git.rootprojects.org
//
// HashiCorp releases:
//
// hashicorp_product = terraform
//
// Other sources (one-off scrapers):
//
// source = nodedist
// url = https://nodejs.org/download/release
//
// source = gitea
// base_url = https://gitea.com
// owner = xorm
// repo = xorm
//
// Complex packages that need custom logic beyond what the classifier
// auto-detects (e.g. ollama's universal binaries, ffmpeg's non-standard
// naming) should put that logic in Go code, not in the config.
@@ -133,9 +135,34 @@ func Read(path string) (*Conf, error) {
}
c := &Conf{}
c.Source = raw["source"]
c.Owner = raw["owner"]
c.Repo = raw["repo"]
// Infer source from primary key, falling back to explicit "source".
switch {
case raw["github_repo"] != "":
c.Source = "github"
c.Owner, c.Repo, _ = strings.Cut(raw["github_repo"], "/")
case raw["git_url"] != "":
c.Source = "gittag"
c.BaseURL = raw["git_url"]
case raw["gitea_repo"] != "":
c.Source = "gitea"
c.Owner, c.Repo, _ = strings.Cut(raw["gitea_repo"], "/")
c.BaseURL = raw["base_url"]
case raw["hashicorp_product"] != "":
c.Source = "hashicorp"
c.Repo = raw["hashicorp_product"]
default:
// Legacy / one-off sources: explicit source key.
c.Source = raw["source"]
c.Owner = raw["owner"]
c.Repo = raw["repo"]
if v := raw["base_url"]; v != "" {
c.BaseURL = v
} else {
c.BaseURL = raw["url"]
}
}
c.TagPrefix = raw["tag_prefix"]
if v := raw["version_prefixes"]; v != "" {
@@ -144,12 +171,6 @@ func Read(path string) (*Conf, error) {
c.VersionPrefixes = strings.Fields(v)
}
if v := raw["base_url"]; v != "" {
c.BaseURL = v
} else {
c.BaseURL = raw["url"]
}
// Accept both "exclude" and "asset_exclude" (back-compat).
if v := raw["exclude"]; v != "" {
c.Exclude = strings.Fields(v)
@@ -166,19 +187,23 @@ func Read(path string) (*Conf, error) {
// Collect unrecognized keys.
known := map[string]bool{
"source": true,
"owner": true,
"repo": true,
"base_url": true,
"url": true,
"tag_prefix": true,
"version_prefix": true,
"version_prefixes": true,
"exclude": true,
"asset_exclude": true,
"asset_filter": true,
"variants": true,
"alias_of": true,
"source": true,
"owner": true,
"repo": true,
"github_repo": true,
"git_url": true,
"gitea_repo": true,
"hashicorp_product": true,
"base_url": true,
"url": true,
"tag_prefix": true,
"version_prefix": true,
"version_prefixes": true,
"exclude": true,
"asset_exclude": true,
"asset_filter": true,
"variants": true,
"alias_of": true,
}
for k, v := range raw {
if !known[k] {

View File

@@ -1,4 +1,2 @@
source = github
owner = stedolan
repo = jq
github_repo = stedolan/jq
version_prefixes = jq-

View File

@@ -1,3 +1 @@
source = github
owner = derailed
repo = k9s
github_repo = derailed/k9s

View File

@@ -1,3 +1 @@
source = github
owner = therootcompany
repo = keypairs
github_repo = therootcompany/keypairs

View File

@@ -1,3 +1 @@
source = github
owner = kubernetes-sigs
repo = kind
github_repo = kubernetes-sigs/kind

View File

@@ -1,3 +1 @@
source = github
owner = cococonscious
repo = koji
github_repo = cococonscious/koji

View File

@@ -1,4 +1,2 @@
source = github
owner = ahmetb
repo = kubectx
github_repo = ahmetb/kubectx
asset_filter = kubectx

View File

@@ -1,4 +1,2 @@
source = github
owner = ahmetb
repo = kubectx
github_repo = ahmetb/kubectx
asset_filter = kubens

View File

@@ -1,3 +1 @@
source = github
owner = gokcehan
repo = lf
github_repo = gokcehan/lf

View File

@@ -1,3 +1 @@
source = github
owner = lsd-rs
repo = lsd
github_repo = lsd-rs/lsd

View File

@@ -1,4 +1,2 @@
source = github
owner = therootcompany
repo = golib
github_repo = therootcompany/golib
tag_prefix = tools/monorel/

View File

@@ -1,3 +1 @@
source = github
owner = mutagen-io
repo = mutagen
github_repo = mutagen-io/mutagen

View File

@@ -1,4 +1,2 @@
source = github
owner = jmorganca
repo = ollama
github_repo = jmorganca/ollama
variants = rocm jetpack5 jetpack6

View File

@@ -1,3 +1 @@
source = github
owner = emdneto
repo = otsgo
github_repo = emdneto/otsgo

View File

@@ -1,3 +1 @@
source = github
owner = jgm
repo = pandoc
github_repo = jgm/pandoc

View File

@@ -1,5 +1,3 @@
source = gitea
gitea_repo = root/pathman
base_url = https://git.rootprojects.org
owner = root
repo = pathman
exclude = armv8

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/bnnanet/pg-essentials.git
git_url = https://github.com/bnnanet/pg-essentials.git

View File

@@ -1,3 +1 @@
source = github
owner = bnnanet
repo = postgresql-releases
github_repo = bnnanet/postgresql-releases

View File

@@ -1,4 +1,2 @@
source = github
owner = bnnanet
repo = postgresql-releases
github_repo = bnnanet/postgresql-releases
asset_filter = postgres

View File

@@ -1,4 +1,2 @@
source = github
owner = bnnanet
repo = postgresql-releases
github_repo = bnnanet/postgresql-releases
asset_filter = psql

View File

@@ -1,4 +1,2 @@
source = github
owner = powershell
repo = powershell
github_repo = powershell/powershell
variants = fxdependent fxdependentWinDesktop

View File

@@ -1,3 +1 @@
source = github
owner = rclone
repo = rclone
github_repo = rclone/rclone

View File

@@ -1,3 +1 @@
source = github
owner = BurntSushi
repo = ripgrep
github_repo = BurntSushi/ripgrep

View File

@@ -1,3 +1 @@
source = github
owner = therootcompany
repo = runzip
github_repo = therootcompany/runzip

View File

@@ -1,3 +1 @@
source = github
owner = sass
repo = dart-sass
github_repo = sass/dart-sass

View File

@@ -1,3 +1 @@
source = github
owner = therootcompany
repo = sclient
github_repo = therootcompany/sclient

View File

@@ -1,3 +1 @@
source = github
owner = chmln
repo = sd
github_repo = chmln/sd

View File

@@ -1,3 +1 @@
source = github
owner = bnnanet
repo = serviceman
github_repo = bnnanet/serviceman

View File

@@ -1,3 +1 @@
source = github
owner = koalaman
repo = shellcheck
github_repo = koalaman/shellcheck

View File

@@ -1,3 +1 @@
source = github
owner = mvdan
repo = sh
github_repo = mvdan/sh

View File

@@ -1,3 +1 @@
source = github
owner = sqlc-dev
repo = sqlc
github_repo = sqlc-dev/sqlc

View File

@@ -1,3 +1 @@
source = github
owner = nalgeon
repo = sqlpkg-cli
github_repo = nalgeon/sqlpkg-cli

View File

@@ -1,3 +1 @@
source = github
owner = abhimanyu003
repo = sttr
github_repo = abhimanyu003/sttr

View File

@@ -1,3 +1 @@
source = github
owner = syncthing
repo = syncthing
github_repo = syncthing/syncthing

View File

@@ -1,2 +1 @@
source = hashicorp
product = terraform
hashicorp_product = terraform

View File

@@ -1,3 +1 @@
source = github
owner = terramate-io
repo = terramate
github_repo = terramate-io/terramate

View File

@@ -1,3 +1 @@
source = github
owner = tinygo-org
repo = tinygo
github_repo = tinygo-org/tinygo

View File

@@ -1,3 +1 @@
source = github
owner = fujiapple852
repo = trippy
github_repo = fujiapple852/trippy

View File

@@ -1,4 +1,2 @@
source = github
owner = coolaj86
repo = uuidv7
github_repo = coolaj86/uuidv7
exclude = -thumb -armeb -loong -gnux32 -risc

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/vim-airline/vim-airline-themes.git
git_url = https://github.com/vim-airline/vim-airline-themes.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/vim-airline/vim-airline.git
git_url = https://github.com/vim-airline/vim-airline.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/dense-analysis/ale.git
git_url = https://github.com/dense-analysis/ale.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/tpope/vim-commentary.git
git_url = https://github.com/tpope/vim-commentary.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/ryanoasis/vim-devicons.git
git_url = https://github.com/ryanoasis/vim-devicons.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/fatih/vim-go.git
git_url = https://github.com/fatih/vim-go.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/preservim/nerdtree.git
git_url = https://github.com/preservim/nerdtree.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/prettier/vim-prettier.git
git_url = https://github.com/prettier/vim-prettier.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/rust-lang/rust.vim.git
git_url = https://github.com/rust-lang/rust.vim.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/tpope/vim-sensible.git
git_url = https://github.com/tpope/vim-sensible.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/z0mbix/vim-shfmt.git
git_url = https://github.com/z0mbix/vim-shfmt.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/vim-syntastic/syntastic.git
git_url = https://github.com/vim-syntastic/syntastic.git

View File

@@ -1,2 +1 @@
source = gittag
url = https://github.com/ziglang/zig.vim.git
git_url = https://github.com/ziglang/zig.vim.git

View File

@@ -1,3 +1 @@
source = github
owner = watchexec
repo = watchexec
github_repo = watchexec/watchexec

View File

@@ -1,3 +1 @@
source = github
owner = caddyserver
repo = xcaddy
github_repo = caddyserver/xcaddy

View File

@@ -1,3 +1 @@
source = github
owner = BurntSushi
repo = xsv
github_repo = BurntSushi/xsv

View File

@@ -1,3 +1 @@
source = github
owner = therootcompany
repo = xz-static
github_repo = therootcompany/xz-static

View File

@@ -1,4 +1,2 @@
source = github
owner = mikefarah
repo = yq
github_repo = mikefarah/yq
exclude = man_page_only

View File

@@ -1,3 +1 @@
source = github
owner = ajeetdsouza
repo = zoxide
github_repo = ajeetdsouza/zoxide