Skip to content

Commit

Permalink
fix(installer): wildcard the extension matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Dec 31, 2016
1 parent 3465d26 commit 1489e64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/electron-forge-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit 1489e64

Please sign in to comment.