From 7fcb8484e8a3ed2230f229b7af59a963a8d490e3 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 28 Jan 2020 16:35:57 -0500 Subject: [PATCH] delete mac files --- build/afterAllArtifactBuild.js | 12 ++++++++++++ electron-builder.json | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 build/afterAllArtifactBuild.js diff --git a/build/afterAllArtifactBuild.js b/build/afterAllArtifactBuild.js new file mode 100644 index 000000000..954468982 --- /dev/null +++ b/build/afterAllArtifactBuild.js @@ -0,0 +1,12 @@ +const fs = require('fs'); + +module.exports = async function(params) { + const { artifactPaths } = params; + + for (var i = 0; i < artifactPaths.length; i++) { + const artifactPath = artifactPaths[i]; + if (artifactPath.includes('.blockmap') || artifactPath.includes('.zip')) { + fs.unlinkSync(artifactPath); + } + } +}; diff --git a/electron-builder.json b/electron-builder.json index c1580016f..b9551cccc 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -97,5 +97,6 @@ ] }, "artifactName": "${productName}_${version}.${ext}", - "afterSign": "./build/afterSignHook.js" + "afterSign": "./build/afterSignHook.js", + "afterAllArtifactBuild": "./build/afterAllArtifactBuild.js" }