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" }