mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 17:18:32 +02:00
Remove tmp dirs
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const path = require('node:path');
|
const path = require('node:path');
|
||||||
const {execSync} = require('node:child_process');
|
const {execSync} = require('node:child_process');
|
||||||
const {cpSync, mkdirSync, chmodSync, unlinkSync} = require('node:fs');
|
const {cpSync, mkdirSync, chmodSync, unlinkSync, rmSync} = require('node:fs');
|
||||||
const pluginRuntimeDir = path.join(__dirname, '..');
|
const pluginRuntimeDir = path.join(__dirname, '..');
|
||||||
const destDir = path.join(__dirname, '..', '..', 'src-tauri', 'vendored', 'plugin-runtime');
|
const destDir = path.join(__dirname, '..', '..', 'src-tauri', 'vendored', 'plugin-runtime');
|
||||||
const blobPath = path.join(pluginRuntimeDir, 'yaak-plugins.blob');
|
const blobPath = path.join(pluginRuntimeDir, 'yaak-plugins.blob');
|
||||||
@@ -63,4 +63,6 @@ const key = `${process.platform}_${process.env.NODE_ARCH ?? process.arch}`;
|
|||||||
const dstPath = path.join(destDir, DST_BIN_MAP[key]);
|
const dstPath = path.join(destDir, DST_BIN_MAP[key]);
|
||||||
cpSync(tmpNodePath, dstPath);
|
cpSync(tmpNodePath, dstPath);
|
||||||
|
|
||||||
|
rmSync(tmp, {recursive: true, force: true});
|
||||||
|
|
||||||
console.log(`Copied sea to ${dstPath}`)
|
console.log(`Copied sea to ${dstPath}`)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ const Downloader = require("nodejs-file-downloader");
|
|||||||
const path = require("node:path");
|
const path = require("node:path");
|
||||||
const fs = require("node:fs");
|
const fs = require("node:fs");
|
||||||
const rimraf = require('rimraf');
|
const rimraf = require('rimraf');
|
||||||
|
const {rmSync} = require("node:fs");
|
||||||
|
|
||||||
// `${process.platform}_${process.arch}`
|
// `${process.platform}_${process.arch}`
|
||||||
const MAC_ARM = 'darwin_arm64';
|
const MAC_ARM = 'darwin_arm64';
|
||||||
@@ -57,5 +58,7 @@ const SRC_BIN_MAP = {
|
|||||||
const includeDst = path.join(dstDir, 'include');
|
const includeDst = path.join(dstDir, 'include');
|
||||||
fs.cpSync(includeSrc, includeDst, {recursive: true});
|
fs.cpSync(includeSrc, includeDst, {recursive: true});
|
||||||
|
|
||||||
|
rmSync(tmpDir, {recursive: true, force: true});
|
||||||
|
|
||||||
console.log("Downloaded protoc to", binDst);
|
console.log("Downloaded protoc to", binDst);
|
||||||
})().catch(err => console.log('Script failed:', err));
|
})().catch(err => console.log('Script failed:', err));
|
||||||
|
|||||||
Reference in New Issue
Block a user