mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-06 10:26:49 +00:00
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:
@@ -1 +1,2 @@
|
||||
github_source = BeyondCodeBootcamp/aliasman
|
||||
git_url = https://github.com/BeyondCodeBootcamp/aliasman.git
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
github_source = BeyondCodeBootcamp/DuckDNS.sh
|
||||
git_url = https://github.com/BeyondCodeBootcamp/DuckDNS.sh.git
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 != "" {
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
github_source = bnnanet/serviceman
|
||||
git_url = https://github.com/bnnanet/serviceman.git
|
||||
|
||||
Reference in New Issue
Block a user