Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
case "$1" in
production) environment=production; shift;;
staging) environment=staging; shift;;
* environment = staging;;
case "$environment" in
staging) app=my-app-staging;;
production) app=my-app-production;;
echo_exec() {
echo " -> $@"
run() {
echo_exec "heroku run $@ --app $app"
case "$1" in
run) $@;;
console) run rails console;;
echo "Error."
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment