electrode-io / electrode-ota-server

Electrode Over The Air Server for hot deployment of React Native and Cordova mobile apps
Other
204 stars 40 forks source link

fix the hashing of update packages #27

Closed datvong-wm closed 6 years ago

datvong-wm commented 6 years ago

The manifest format was incorrect and/or changed. It was previously { "filename1": "hash1", "filename2": "hash2" .... }

But it should be [ "filename1:hash1", "filename2:hash2"... ]

For packageHash, we were using the hash of the content of the zip file, we should be using the hash of the manifest file.

Also, for update packages, consistency checks were failing because we were sending the hash of the diff and not the hash of the latest version. The code-push client takes the diff, merges with existing package, and computes the hash from that merged version.

Fixes #23