feat(installerconf): github_source packages include git_url for clone fallback

git_url is now a standalone field that can appear alongside any source
type. For githubsource packages, it adds a git clone entry per release
in addition to the tarball and zipball. Updated aliasman, duckdns.sh,
and serviceman configs.
This commit is contained in:
AJ ONeal
2026-03-11 11:46:59 -06:00
parent bbcaa0f464
commit bd3bd85e43
5 changed files with 23 additions and 0 deletions

View File

@@ -1 +1,2 @@
github_source = BeyondCodeBootcamp/aliasman
git_url = https://github.com/BeyondCodeBootcamp/aliasman.git

View File

@@ -1 +1,2 @@
github_source = BeyondCodeBootcamp/DuckDNS.sh
git_url = https://github.com/BeyondCodeBootcamp/DuckDNS.sh.git

View File

@@ -445,6 +445,16 @@ func classifyGitHubSource(pkg string, conf *installerconf.Conf, d *rawcache.Dir)
Date: date,
})
}
if conf.GitURL != "" {
assets = append(assets, storage.Asset{
Filename: repo + "-" + tag,
Version: version,
Channel: channel,
Format: "git",
Download: conf.GitURL,
Date: date,
})
}
}
return assets, nil
}

View File

@@ -74,6 +74,11 @@ type Conf struct {
// (e.g. a Gitea instance or nodedist index URL).
BaseURL string
// GitURL is the git clone URL for source-installable packages.
// Present alongside github_source/gitea_source to provide a
// git clone fallback in addition to release tarballs.
GitURL string
// TagPrefix filters releases in monorepos. Only tags starting with
// this prefix are included, and the prefix is stripped from the
// version string. Example: "tools/monorel/"
@@ -160,6 +165,11 @@ func Read(path string) (*Conf, error) {
c.BaseURL = raw["url"]
}
// git_url can appear alongside any source type (e.g. github_source)
// to provide a git clone fallback. When it's the only key, it's the
// primary source (gittag).
c.GitURL = raw["git_url"]
c.TagPrefix = raw["tag_prefix"]
if v := raw["version_prefixes"]; v != "" {

View File

@@ -1 +1,2 @@
github_source = bnnanet/serviceman
git_url = https://github.com/bnnanet/serviceman.git