Quick and short one. The Heroku hosted app I’m working on has a staging env. I need to quickly deploy from local to the staging Heroku remote repo a lot. Doing
git push staging whateverbranch:master is fine, but just tedious to type every time. And since the app is at early development stage, I need to constantly deploy to staging from a local feature branch to just do the show-n-tell, a simple bash/zsh alias will not do the job (well, I don’t know, maybe it can …).
So… since I’m using RVM and a project
.rvmrc anyway, I throw the following function into my project
.rvmrc. With that, I can just do
deploy staging, job done!
It’s quick and dirty, and once the app gets released I’m sure I’ll come back to modify it or move the deployment into a Rake task. Working just fine for now!