2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018

11/21/2009: Scripting the Heroku Push

Scripting the Heroku Push

This tip falls under the KISS principle. I recently started using the Heroku service to run some Rails websites. After making changes and committing them to your local Git repository, those changes are pushed to Heroku using the command git push heroku master. Since I'm likely to forget and since it's four words I created a file called script/push with that command. Here are the steps.

  1. Create a file called script/push with one line: git push heroku master.
  2. Run chmod +x script/push
  3. Run git add script/push.
  4. Run git commit -m "scripting the Heroku push".
  5. Run script/push.

That's it. Just script/push whenever you need to deploy.

subscribe via RSS