Skip to content

Commit

Permalink
Split installation of npm dependencies for electron
Browse files Browse the repository at this point in the history
Co-authored-by: Emmanuel Leblond <emmanuel.leblond@gmail.com>
  • Loading branch information
FirelightFlagboy and touilleMan committed Aug 1, 2024
1 parent 365829b commit 3b428bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/package-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,23 @@ jobs:
sudo apt-get install -y fuse3 libfuse3-dev
timeout-minutes: 2

- name: Install dependencies
shell: bash
run: |
npm clean-install
(cd electron && npm clean-install)
(cd ../bindings/electron && npm clean-install)
- name: Install client dependencies
# Use `--ignore-scripts` to prevent the postinstall script trying to be smarter than us and
# install electron dependencies (as it would use `npm install` instead of `npm clean-install`).
run: npm clean-install --ignore-scripts
working-directory: client
timeout-minutes: 10

- name: Install electron dependencies
run: npm clean-install
working-directory: client/electron
timeout-minutes: 2

- name: Install electron bindings dependencies
run: npm clean-install
working-directory: bindings/electron
timeout-minutes: 1

- name: Build Electron bindings
run: npm run build:release
working-directory: bindings/electron
Expand Down
4 changes: 3 additions & 1 deletion client/electron/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ parts:
# Patch client package.json to use local pre-packaged megashark-lib
sed -i "s;megashark-lib\": \".*\";megashark-lib\": \"file:${CRAFT_STAGE}/megashark-lib.tar.gz\";" package.json
npm install
# Use `--ignore-scripts` to prevent the postinstall script trying to be smarter than us and
# install electron dependencies (as it would use `npm install` instead of `npm clean-install`).
npm install --ignore-scripts
npm run electron:copy
cd electron
Expand Down

0 comments on commit 3b428bb

Please sign in to comment.