From 5fbee9208641715f131e759c99c868189b80dc63 Mon Sep 17 00:00:00 2001 From: Perry Mitchell Date: Tue, 30 Mar 2021 21:10:04 +0300 Subject: [PATCH] Fix mac zip prep for other platforms --- resources/scripts/fix-mac-zip.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/resources/scripts/fix-mac-zip.js b/resources/scripts/fix-mac-zip.js index 6dae4d9..35fef42 100644 --- a/resources/scripts/fix-mac-zip.js +++ b/resources/scripts/fix-mac-zip.js @@ -9,20 +9,16 @@ const packageInfo = require(path.join(currentWorkingDirectory, "package.json")); const APP_NAME = packageInfo.build.productName; const APP_VERSION = process.argv[2] ? process.argv[2] : packageInfo.version; const APP_DIST_PATH = path.join(currentWorkingDirectory, "dist"); - -console.log("Zipping Started"); - -execSync( - `ditto -c -k --sequesterRsrc --keepParent --zlibCompressionLevel 9 "${APP_DIST_PATH}/mac/${APP_NAME}.app" "${APP_DIST_PATH}/${APP_NAME}-${APP_VERSION}-mac.zip"` -); - -console.log("Zipping Completed"); - const APP_GENERATED_BINARY_PATH = path.join(APP_DIST_PATH, `${APP_NAME}-${APP_VERSION}-mac.zip`); module.exports = buildResults => { const hasMacZip = buildResults.artifactPaths.some(artPath => /mac*\.zip$/.test(artPath)); if (!hasMacZip) return; + console.log("Zipping Started"); + execSync( + `ditto -c -k --sequesterRsrc --keepParent --zlibCompressionLevel 9 "${APP_DIST_PATH}/mac/${APP_NAME}.app" "${APP_DIST_PATH}/${APP_NAME}-${APP_VERSION}-mac.zip"` + ); + console.log("Zipping Completed"); try { let output = execSync( `${appBuilderPath} blockmap --input="${APP_GENERATED_BINARY_PATH}" --output="${APP_DIST_PATH}/${APP_NAME}-${APP_VERSION}-mac.zip.blockmap" --compression=gzip`