Ignore x86 Windows binary when populating site download buttons

This commit is contained in:
hensm
2020-09-07 19:37:01 +01:00
parent 31b52cc07e
commit 48ee01cdc7

View File

@@ -97,7 +97,10 @@ function onResponse (res) {
for (const asset of res.assets) {
const formattedSize = formatSize(asset.size);
switch (asset.name.match(/.*\.(.*)$/).pop()) {
const REGEX_EXT = /.*\.(.*)$/;
const REGEX_ARCH = /.*(x(?:86|64))\..*$/;
switch (asset.name.match(REGEX_EXT).pop()) {
case "xpi":
downloadExtBtn.href = asset.browser_download_url;
downloadExtBtn.dataset.version = res.tag_name;
@@ -107,6 +110,11 @@ function onResponse (res) {
case "exe":
const arch = asset.name.match(REGEX_ARCH).pop();
if (arch !== "x64") {
break;
}
populateAppListApp(
appListWinBtn, asset.browser_download_url
, asset.name, formattedSize);