Browse Source

Merge pull request #657 from MortalKastor/fix-windows-build

Fix Windows build
master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
3eb4b207c4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      electron-builder.yml
  2. 4
      package.json
  3. 12
      scripts/compile.sh
  4. 10
      scripts/dist.sh
  5. 2
      scripts/postinstall.sh

1
electron-builder.yml

@ -1,4 +1,5 @@
appId: com.ledger.live appId: com.ledger.live
npmRebuild: false
protocols: protocols:
name: Ledger Live name: Ledger Live

4
package.json

@ -7,9 +7,9 @@
"author": "Ledger", "author": "Ledger",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"compile": "bash ./scripts/dist.sh", "compile": "bash ./scripts/compile.sh",
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null", "dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null",
"dist": "yarn compile && electron-builder", "dist": "bash ./scripts/dist.sh",
"test": "jest", "test": "jest",
"flow": "flow", "flow": "flow",
"lint": "eslint src webpack .storybook", "lint": "eslint src webpack .storybook",

12
scripts/compile.sh

@ -0,0 +1,12 @@
#/bin/bash
set -e
export GIT_REVISION=`git rev-parse HEAD`
export SENTRY_URL=https://db8f5b9b021048d4a401f045371701cb@sentry.io/274561
rm -rf ./node_modules/.cache dist
yarn
rm -rf dist &&
NODE_ENV=production yarn run webpack-cli --mode production --config webpack/internals.config.js &&
NODE_ENV=production yarn run electron-webpack

10
scripts/dist.sh

@ -1,11 +1,3 @@
#/bin/bash #/bin/bash
set -e yarn compile && DEBUG=electron-builder electron-builder
export GIT_REVISION=`git rev-parse HEAD`
export SENTRY_URL=https://db8f5b9b021048d4a401f045371701cb@sentry.io/274561
rm -rf ./node_modules/.cache dist
yarn
NODE_ENV=production webpack-cli --mode production --config webpack/internals.config.js
NODE_ENV=production electron-webpack

2
scripts/postinstall.sh

@ -57,7 +57,7 @@ function REBUILD_ELECTRON_NATIVE_DEPS {
echo "> Electron native deps are up to date. Skipping" echo "> Electron native deps are up to date. Skipping"
else else
echo "> Installing electron native deps" echo "> Installing electron native deps"
electron-builder install-app-deps DEBUG=electron-builder electron-builder install-app-deps
SET_HASH 'package.json' $PACKAGE_JSON_HASH SET_HASH 'package.json' $PACKAGE_JSON_HASH
fi fi
} }

Loading…
Cancel
Save