fix: cleanup electron build script (#1813)

This commit is contained in:
Peng Xiao
2023-04-04 20:40:07 +08:00
committed by GitHub
parent c023d0a2b8
commit 5bd3aa4a80
5 changed files with 64 additions and 150 deletions

View File

@@ -40,6 +40,17 @@ await fs.move(affineWebOutDir, publicAffineOutDir, { overwrite: true });
await buildLayers();
echo('Build layers done');
// step 3: build octobase-node
let buildOctobaseNode = 'yarn workspace @affine/octobase-node build';
if (process.env.TARGET) {
buildOctobaseNode += ` --target=${process.env.TARGET}`;
}
await $([buildOctobaseNode]);
// step 4: copy octobase-node to electron dist
await fs.ensureDir('./apps/electron/dist/layers/main/');
await $`cp ./packages/octobase-node/octobase.*.node ./apps/electron/dist/layers/main/`;
/// --------
/// --------
/// --------