Skip to content
Permalink
Browse files

fix(installer): wildcard the extension matchers

  • Loading branch information
MarshallOfSound committed Dec 29, 2016
1 parent 3465d26 commit 1489e641e62693edae7caded20c42ce9aa983e95
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/electron-forge-install.js
@@ -72,15 +72,15 @@ const main = async () => {
}

const installTargets = {
win32: ['.exe'],
darwin: ['OSX.zip', 'darwin.zip', 'macOS.zip', 'mac.zip', '.dmg'],
linux: ['.rpm', '.deb', '.flatpak'],
win32: [/\.exe$/],
darwin: [/OSX.*\.zip$/, /darwin.*\.zip$/, /macOS.*\.zip$/, /mac.*\.zip$/, /\.dmg$/],
linux: [/\.rpm$/, /\.deb$/, /\.flatpak$/],
};

const possibleAssets = assets.filter((asset) => {
const targetSuffixes = installTargets[process.platform];
for (const suffix of targetSuffixes) {
if (asset.name.endsWith(suffix)) return true;
if (suffix.test(asset.name)) return true;
}
return false;
});

0 comments on commit 1489e64

Please sign in to comment.
You can’t perform that action at this time.