mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-23 22:16:48 +00:00
fix(yq): filter out special non-build files
This commit is contained in:
@@ -4,8 +4,31 @@ var github = require('../_common/github.js');
|
||||
var owner = 'mikefarah';
|
||||
var repo = 'yq';
|
||||
|
||||
let ODDITIES = ['man_page_only'];
|
||||
|
||||
function isOdd(build) {
|
||||
for (let oddity of ODDITIES) {
|
||||
let isOddity = build.name.includes(oddity);
|
||||
if (isOddity) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
let builds = [];
|
||||
|
||||
for (let build of all.releases) {
|
||||
let odd = isOdd(build);
|
||||
if (odd) {
|
||||
continue;
|
||||
}
|
||||
|
||||
builds.push(build);
|
||||
}
|
||||
|
||||
all.releases = builds;
|
||||
return all;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user