nicinabox

Writings on bikes, beer, and code

Shortcutting Heroku Deployments

If you familiar with Heroku you may know that deploying is as easy as pushing to their remote repository:

1
$ git push heroku

But this can get really monotonous, especially if you’re frequently pushing to a staging app (then you have to specify the branch name as well). To make things a little easier I whipped up this little shell function to make deployments a snap.

We always name our heroku remotes staging and production. To deploy to staging, for instance, just pass the branch name you want to deploy:

1
$ deploy dev

Here’s the function. Just drop it in your .bashrc (or whatever shell config you use).


Comments