fix(electron): check bundle (#3527)

This commit is contained in:
Alex Yang
2023-08-02 08:56:00 -07:00
committed by GitHub
parent db1b4d48b8
commit 33613c7041
4 changed files with 58 additions and 70 deletions

View File

@@ -3,10 +3,11 @@ import { readdir } from 'node:fs/promises';
const outputRoot = fileURLToPath(
new URL(
'../zip-out/AFFiNE-canary.app/Contents/Resources/app',
'../out/canary/AFFiNE-canary-darwin-arm64/AFFiNE-canary.app/Contents/Resources/app',
import.meta.url
)
);
const outputList = [
[
'dist',

View File

@@ -1,16 +0,0 @@
#!/bin/bash
# Set the directory
dir="./out/canary/make/zip/darwin/arm64"
# Get the first file
file=$(ls -1 $dir | head -n 1)
# Check if file exists and is a zip file
if [ -f "$dir/$file" ] && [ ${file: -4} == ".zip" ]
then
# Unzip the file
unzip "$dir/$file" -d "zip-out"
else
echo "No zip file found"
fi