Skip to content
Advertisement

electron – incremental updating?

I am using electron-vue & electron-packager. I am wondering whether I can do something like incremental updating, that is, after running an electron build command, I don’t need to copy the whole electron-linux-x64 folder to my dist machine to update it to the newest, but instead I only need to copy some files in the folder.

Here is what I found up to now: I edit some code for the renderer process. Then I let electron-packager to build a package for linux. Then I find that not all the generated files have been changed. Instead, it seems that only the resources/*.asar have been changed. If I just copy these files to the dist machine, it seems that the machine updates well. But I am not sure whether some hidden files are changed too.

I would appreciate it if anyone could help me!

Advertisement

Answer

Since there are some upvotes to this question, and after three years I have gained more knowledge let me answer myself, making whoever reads this post can find a solution 🙂

Firstly, in 2020 there may already have solutions. For instance, try this and this.

Secondly, you can also use rsync to only copy the changed parts in a folder. Moreover, if a big file (say 10GB) only changes a little bit in the middle (say 1MB), it will only transfer that little bit (say 1MB). This is a general tool and can be used everywhere.

Lastly, as a side remark, manually copy your file to the development server is not a good idea. Try to automate this process. The simplest would be a several-line bash script using scp/rsync and so on, and the most complex may be Kubernetes and Docker.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement