fix: remove some backup files generated by pkg if present (#1287)
This commit is contained in:
parent
9a9b7baf15
commit
9f160ad11a
1 changed files with 11 additions and 0 deletions
|
|
@ -20,6 +20,10 @@ const architectures = ["x64", "arm64"];
|
|||
let targets = platforms.flatMap((platform) =>
|
||||
architectures.map((arch) => `${platform}-${arch}`),
|
||||
);
|
||||
const assetBackups = [
|
||||
"node_modules/win-ca/lib/crypt32-ia32.node.bak",
|
||||
"node_modules/win-ca/lib/crypt32-x64.node.bak"
|
||||
];
|
||||
|
||||
let esbuildOnly = false;
|
||||
for (let i = 2; i < process.argv.length; i++) {
|
||||
|
|
@ -152,6 +156,13 @@ async function installNodeModuleInTempDirAndCopyToCurrent(package, toCopy) {
|
|||
}
|
||||
}
|
||||
|
||||
console.log("[info] Cleaning up artifacts from previous builds...");
|
||||
|
||||
// delete asset backups generated by previous pkg invocations, if present
|
||||
for (const assetPath of assetBackups) {
|
||||
fs.rmSync(assetPath, {force: true});
|
||||
}
|
||||
|
||||
console.log("[info] Building with esbuild...");
|
||||
// Bundles the extension into one file
|
||||
await esbuild.build({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue