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 code-push patch #19

Closed sdg9 closed 6 years ago

sdg9 commented 7 years ago

Previously a patch would always update the oldest. This happened whether or not a version was supplied contrary to the CLI saying (code-push path)

"--label, -l Label of the release to update. Defaults to the latest release within the specified deployment".

With this change a patch updates the most recent version if no label is supplied (default behavior according to CLI). It also updates the correct package when a label is provided.

NOTE I am a self proclaimed cassandra noob and don't know how to both use id_: within(history_) AND label: label. That was not using, using $in syntax was not using, etc. So I defaulted to what I know in JS, using lodash's filter. It is working but I assume there is a more elegant way to do so. I will feel no shame if you close this PR and implement it better yourself.

datvong-wm commented 6 years ago

Can you sign the license agreement and merge conflicts?

datvong-wm commented 6 years ago

I merged this PR in another PR.