ref!: git sources & posix releases

This commit is contained in:
AJ ONeal
2024-09-13 08:33:49 +00:00
parent 8f39617bcd
commit f19fcc361a
3 changed files with 6 additions and 58 deletions
+4 -32
View File
@@ -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;
}
+1 -13
View File
@@ -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;
});
};
+1 -13
View File
@@ -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;
});
};