Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Fix mac zip prep for other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell committed Mar 30, 2021
1 parent 43b34f4 commit 5fbee92
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions resources/scripts/fix-mac-zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 5fbee92

Please sign in to comment.