fix(electron): fix build script (#6422)

This commit is contained in:
EYHN
2024-04-01 07:51:35 +00:00
parent f4e1e23120
commit 9c6eba8971
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -283,7 +283,7 @@ jobs:
env:
DISTRIBUTION: 'desktop'
- name: zip web
run: tar -czf dist.tar.gz --directory=packages/frontend/electron/dist .
run: tar -czf dist.tar.gz --directory=packages/frontend/electron/renderer/dist .
- name: Upload web artifact
uses: actions/upload-artifact@v4
with:
@@ -12,7 +12,13 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url));
const repoRootDir = path.join(__dirname, '..', '..', '..', '..');
const electronRootDir = path.join(__dirname, '..');
const publicDistDir = path.join(electronRootDir, 'resources');
const webDir = path.join(repoRootDir, 'packages', 'frontend', 'electron');
const webDir = path.join(
repoRootDir,
'packages',
'frontend',
'electron',
'renderer'
);
const affineWebOutDir = path.join(webDir, 'dist');
const publicAffineOutDir = path.join(publicDistDir, `web-static`);
const releaseVersionEnv = process.env.RELEASE_VERSION || '';
+2 -2
View File
@@ -44,8 +44,8 @@ const getDistribution = () => {
cwd = path.join(projectRoot, 'packages/frontend/web');
return 'browser';
case 'desktop':
cwd = path.join(projectRoot, 'packages/frontend/electron');
entry = path.join(cwd, 'renderer', 'index.tsx');
cwd = path.join(projectRoot, 'packages/frontend/electron/renderer');
entry = path.join(cwd, 'index.tsx');
return DISTRIBUTION;
default: {
throw new Error('DISTRIBUTION must be one of browser, desktop');