From 286efb78984b7652286074ce28598ac76db8761e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 15 Nov 2023 13:36:00 -0700 Subject: [PATCH] fix(yq): filter out special non-build files --- yq/releases.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/yq/releases.js b/yq/releases.js index cf78b08..a1d8264 100644 --- a/yq/releases.js +++ b/yq/releases.js @@ -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; }); };