From 8f39617bcd7b940a914e0eafeeda38152e41204c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 12 Sep 2024 01:55:48 +0000 Subject: [PATCH] fix: allow 'posix_2017' and 'posix_2024' for non-windows OSes --- _webi/builds-cacher.js | 4 ++-- _webi/serve-installer.js | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/_webi/builds-cacher.js b/_webi/builds-cacher.js index ed30cc4..24f8abc 100644 --- a/_webi/builds-cacher.js +++ b/_webi/builds-cacher.js @@ -726,9 +726,9 @@ BuildsCacher.create = function ({ ALL_TERMS, installers, caches }) { if (hostTarget.os === 'windows') { oses = ['ANYOS', 'windows']; } else if (hostTarget.os === 'android') { - oses = ['ANYOS', 'posix_2017', 'android', 'linux']; + oses = ['ANYOS', 'posix_2017', 'posix_2024', 'android', 'linux']; } else { - oses = ['ANYOS', 'posix_2017', hostTarget.os]; + oses = ['ANYOS', 'posix_2017', 'posix_2024', hostTarget.os]; } let waterfall = HostTargets.WATERFALL[hostTarget.os] || {}; diff --git a/_webi/serve-installer.js b/_webi/serve-installer.js index ab9a57a..eae8519 100644 --- a/_webi/serve-installer.js +++ b/_webi/serve-installer.js @@ -132,10 +132,23 @@ InstallerServer.helper = async function ({ formats: projInfo.formats, }; + // TODO .findMatchingPackages() should probably account for this let hasOs = projInfo.oses.includes(hostTarget.os); + let maybePosix = !hasOs && hostTarget.os !== 'windows'; + if (maybePosix) { + let posixes = ['posix_2017', 'posix_2024']; + for (let posixYear of posixes) { + let hasPosix = projInfo.oses.includes(posixYear); + if (hasPosix) { + hasOs = true; + break; + } + } + } if (!hasOs) { hasOs = projInfo.oses.includes('ANYOS'); } + if (!hasOs) { let pkg1 = Object.assign(buildTargetInfo, errPackage); return [pkg1, tmplParams];