From 8fbdfbfd74dbd7e4f432bcd22434454bd490bd1b Mon Sep 17 00:00:00 2001 From: Filippo Tortomasi Date: Thu, 18 Jul 2024 11:47:36 +0200 Subject: [PATCH] fix: add support for arm64-mac naming convention files generated by electron-builder --- src/asset-platform.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/asset-platform.js b/src/asset-platform.js index cc671bbe..f24eeb99 100644 --- a/src/asset-platform.js +++ b/src/asset-platform.js @@ -1,6 +1,11 @@ const { PLATFORM_ARCH } = require("./constants"); const assetPlatform = (fileName) => { + // Rule for electron-builder support, example: example-1.0.0-arm64-mac.zip + if (/.*-arm64-mac\.zip/i.test(fileName)) { + return PLATFORM_ARCH.DARWIN_ARM64; + } + if (/.*(mac|darwin|osx).*(-arm).*\.zip/i.test(fileName)) { return PLATFORM_ARCH.DARWIN_ARM64; }