How can I cache files for electron-builder?

Viewed 1116

I use electron-builder as part of my build pipeline to build nodegit as a native dependency. It seems that every time I execute yarn install this dependency is compiled from scratch which takes way too long. Is there any way to use a cache for this?

$ electron-builder install-app-deps
  • electron-builder  version=22.9.1
  • loaded configuration  file=package.json ("build" field)
  • rebuilding native dependencies  dependencies=nodegit@0.27.0 platform=win32 arch=x64
  • rebuilding native dependency  name=nodegit version=0.27.0
Done in 150.42s.

I tried prebuild and compiled nodegit. I got out a nodegit-v0.27.0-node-v83-win32-x64.tar.gz but I don't really know where I can hook this in so this is used instead of compiling it over and over.

Afaik, I can bring S3 somehow into the game where I can host this file, but this is unnecessary overkill for my use case. I would be fine if I can "offer" this file somehow through my own in-house FTP or gitlab instance.

0 Answers
Related