From f19fcc361aba802fc64c26cf5d6c2c3b82dc96c0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 5 Nov 2023 16:21:26 -0700 Subject: [PATCH] ref!: git sources & posix releases --- _common/github-source.js | 36 ++++-------------------------------- aliasman/releases.js | 14 +------------- duckdns.sh/releases.js | 14 +------------- 3 files changed, 6 insertions(+), 58 deletions(-) diff --git a/_common/github-source.js b/_common/github-source.js index 5b9da27..0b9781e 100644 --- a/_common/github-source.js +++ b/_common/github-source.js @@ -15,8 +15,6 @@ async function getDistributables( request, owner, repo, - oses, - arches, baseurl = 'https://api.github.com', ) { if (!owner) { @@ -82,41 +80,15 @@ async function getDistributables( lts: lts, channel: channel, date: date, - os: '', // will be guessed by download filename - arch: '', // will be guessed by download filename - ext: '', // will be normalized + os: '*', + arch: '*', + libc: '', + ext: '', download: resp.request.uri.href, }); } } - if (oses) { - return combinate(all, oses, arches); - } - - return all; -} - -function combinate(all, oses, arches) { - let releases = all.releases; - // ex: arches = ['amd64', 'arm64', 'armv7l', 'armv6l', 'x86']; - // ex: oses = ['macos', 'linux', 'bsd', 'posix']; - - let combos = []; - for (let release of releases) { - for (let arch of arches) { - for (let os of oses) { - let combo = { - arch: arch, - os: os, - }; - let rel = Object.assign({}, release, combo); - combos.push(rel); - } - } - } - all.releases = combos; - return all; } diff --git a/aliasman/releases.js b/aliasman/releases.js index 2b97b1c..61e1f69 100644 --- a/aliasman/releases.js +++ b/aliasman/releases.js @@ -5,19 +5,7 @@ var owner = 'BeyondCodeBootcamp'; var repo = 'aliasman'; module.exports = function (request) { - let arches = [ - 'amd64', - 'arm64', - 'armv6l', - 'armv7l', - 'ppc64le', - 'ppc64', - 's390x', - 'x86', - ]; - let oses = ['freebsd', 'linux', 'macos', 'posix']; - return githubSource(request, owner, repo, oses, arches).then(function (all) { - all._names = ['aliasman', 'legacy']; + return githubSource(request, owner, repo).then(function (all) { return all; }); }; diff --git a/duckdns.sh/releases.js b/duckdns.sh/releases.js index a4bbe57..4a97ac6 100644 --- a/duckdns.sh/releases.js +++ b/duckdns.sh/releases.js @@ -5,19 +5,7 @@ var owner = 'BeyondCodeBootcamp'; var repo = 'DuckDNS.sh'; module.exports = function (request) { - let arches = [ - 'amd64', - 'arm64', - 'armv6l', - 'armv7l', - 'ppc64le', - 'ppc64', - 's390x', - 'x86', - ]; - let oses = ['freebsd', 'linux', 'macos', 'posix']; - return githubSource(request, owner, repo, oses, arches).then(function (all) { - all._names = ['DuckDNS.sh', 'duckdns.sh', 'legacy']; + return githubSource(request, owner, repo).then(function (all) { return all; }); };