Skip to content

Commit

Permalink
use api rather than command line
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Nov 28, 2022
1 parent 51426dd commit c071402
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/binary/build.ts
Expand Up @@ -19,6 +19,7 @@ import execa from 'execa'
import { testStaticAssets } from './util/testStaticAssets'
import performanceTracking from '../../system-tests/lib/performance'
import verify from '../../cli/lib/tasks/verify'
import * as electronBuilder from 'electron-builder'

const globAsync = promisify(glob)

Expand Down Expand Up @@ -260,12 +261,16 @@ require('./packages/server/index.js')
fs.writeFileSync(meta.distDir('index.js'), fs.readFileSync(meta.distDir('index.js'), 'utf8').replace('server/index.js', 'server/index.jsc'))

try {
execSync(`electron-builder ${args.join(' ')}`, {
stdio: 'inherit',
env: {
...process.env,
NODE_OPTIONS: '--max_old_space_size=32768',
DEBUG: 'cypress:snapgen:info',
await electronBuilder.build({
publish: 'never',
config: {
electronVersion,
directories: {
app: appFolder,
output: outputFolder,
},
icon: iconFilename,
asar: false,
},
})
} catch (e) {
Expand Down

0 comments on commit c071402

Please sign in to comment.