summaryrefslogtreecommitdiff
path: root/bin/build-electron
blob: 1b90b55658b6967403a7b307732ce132187b3a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

if [ "$BUILD" = "windows" ]; then
  cd electron
  yarn --link-duplicates --pure-lockfile && yarn run dist -w --ia32
elif [ "$BUILD" = "linux" ]; then
  args="-l --x64"

  docker run --rm \
    -e ELECTRON_CACHE=$HOME/.cache/electron \
    -v ${PWD}/electron:/project \
    -v ~/.cache/electron:/root/.cache/electron \
    electronuserland/builder:wine \
    /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn run dist ${args}"
else
  cd electron
  npm install
  npm run dist
fi