Created
November 2, 2012 16:12
-
-
Save scootklein/4002367 to your computer and use it in GitHub Desktop.
shell functions for running commands against heroku product and staging envs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hp() { | |
orig_args="$@" | |
remotes=`git remote -v | grep production | grep -v worker` | |
set $remotes | |
repo=${2/git@heroku.com:/} | |
hp_predicate=${repo/.git/}; | |
echo "heroku $orig_args --app $hp_predicate" | |
heroku $orig_args --app $hp_predicate | |
} | |
function hs() { | |
orig_args="$@" | |
remotes=`git remote -v | grep staging | grep -v worker` | |
set $remotes | |
repo=${2/git@heroku.com:/} | |
hp_predicate=${repo/.git/}; | |
echo "heroku $orig_args --app $hp_predicate" | |
heroku $orig_args --app $hp_predicate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment