Automating PhoneGap Builds with Gulp. Part IV

 
event

In part III we got PhoneGap Build (PGB) “cooking” our artifacts and generating the binaries stew.

D-Ploy

That compilation takes some time so we can:

  1. sit and wait
  2. be proactive and check the build status

We chose the first options as deploying is not done every time the app is built (we install the application on the devices from PGB itself while developing). But if we wanted to check whether a build is ready to be deployed we could poll the PGB API and check the status for the platform that we want to deploy.

The idea is (after some sanity check), using the aforementioned phonegap-build-api package, download the resource for a given platform (using the right file extension) and calling the HockeyApp method that uploads the application version for the chosen platform and environment.

Wrapping it up

Package, queuing a build, waiting and pushing a version.

That is all it takes to have a new version of the application for a given platform ready for the testers.

Two commands. And the peace of mind that there is very little room to screw up. I’ll type them once again, just for the heck of it.