scatterd-dotfiles/bin/staging
Dan Croak 8649403044 Add Heroku scripts
staging:

    staging console
    staging migrate
    staging process
    staging open
    watch staging ps
    staging tail

production:

    production backup
    production console
    production migrate
    production open
    watch production ps
    production tail

load-backup-into:

    load-backup-into staging
    load-backup-into development

Notes on the last command:

* Copy latest production database backup into development database using
  preferred pgbackups + pg_restore method recommended by Heroku.
* Do not assume local development database name.
* Get local database name from config/database.yml.
* This did not previously exist in dotfiles.

Supporting change for these commands:

* Add ~/.bin to the PATH.

https://github.com/thoughtbot/dotfiles/pull/76
2013-01-12 18:06:12 -08:00

26 lines
546 B
Ruby
Executable file

#!/usr/bin/env ruby
#
# Interact with the staging environment on Heroku.
#
# staging backup
# staging console
# staging migrate
# staging tail
#
# The script also acts as a pass-through, so you can do anything with it that
# you can do with `heroku ______ -r staging`:
#
# staging open
# watch staging ps
require File.join(File.dirname(__FILE__), 'deployment_environment')
class Staging < DeploymentEnvironment
def initialize(subcommands)
@environment = 'staging'
super(subcommands)
end
end
staging = Staging.new(ARGV)
staging.run