Launch -- Continuous Meteor App Deploys18 Jul 2016
Update 7/21/2016: I have changed the links for the sites out from Galaxy to Heroku. All the Galaxy information still applies, just using Heroku since it’s free.
Last week, I gave a talk at Crater Remote Conference about how we build, deploy, and distribute Meteor Cordova apps automatically. The video isn’t available yet, but the slides are available here. And so you don’t have to flip through all that, here is the gist of the presentation.
What if I told you that you could build, deploy, and distribute an iOS app built with Meteor like this? launch is here.
launch build myapp.com launch galaxy myapp.com launch testflight
We are currently developing an app for iOS and Android. We chose Meteor so that we could target both platforms using the same code base (thanks to the Meteor build tool and Cordova). The development experience has been pretty great, but we made the decision early on that we wanted to be able to ship 1 alpha build a week. This would allow us to show progress to our stakeholders, and get the app in the hands of our team often.
Current Build Process
Our current build process is pretty involved and tedious to do manually. It takes about 30 minutes if you have everything set up, have the process memorized, and are all around having a good day. Once a week, 30 minutes isn’t that hard to sacrifice. But on a bad day, this can take forever. It’s also not very conducive to the idea that everyone on the team can deploy.
There Is A Better Way
We developed a tool called
launch that automates this process for you! You can run it locally, or on a CI. This way, we could focus on writing code, and deploy based on pull requests or release tags.
launch Can Do
- build iOS app
- build Android app
- deploy to Galaxy
- deploy to Hockey (both iOS and Android)
- deploy to iTunes Store/TestFlight
- deploy to Google Play
npm install -g meteor-launch launch init # adds launch.json vim launch.json # fill out the vars
That’s all you have to do to add
launch to your new or existing Meteor project. There is documentation on all the actions supported, and explanations on how to get the variables you will need.
We have set up a couple examples of how to use
launch, including how to run them on Travis.
Launch Basic Example
This project is the boilerplate you get from a
meteor create, and demonstrates how to build an Android app, deploy it to Galaxy, and upload the app to Hockey for distribution using these commands:
launch build https://launch-basic-example.meteorapp.com launch galaxy https://launch-basic-example.meteorapp.com launch hockey
Launch Todos Example
We also have the Meteor Todos example, which demonstrates how to use all the
launch build https://launch-todos-example.meteorapp.com launch galaxy https://launch-todos-example.meteorapp.com launch hockey # uploads iOS and Android launch testflight launch playstore
- Source Code
- Travis Config
- Travis Build
- Live Site on Heroku
- Android Hockey Download
- iOS Hockey Download
TestFlight and Google Play Store uploads you will have to take my word for, but try it out and see for yourself!
launch Helped Us
Our original goal was to ship 1 alpha build a week during development of our app. With
launch: we have been shipping multiple builds a day. It’s now easy for anyone on our team to ship a build to our alpha and beta environments just by creating a GitHub release tag. Our stakeholders are well informed about progress (and they are happy). Selfishly, I am super happy because building and deploying is the worst.
Shipping 2 builds a day manually would take over 5 hours a week. It takes a fraction of that time to set up
launch, and then you never have to think about it again.
Check It Out
The presentation and the docs go in to a lot more detail about how to set everything up, and how to get running on a CI.
Let me know if you have any questions! I am happy to help out.