Sha256: 79f11208e2caea8d679b8815ececc78b823c3069ab71c1b9386e91d7ba45875f

Contents?: true

Size: 952 Bytes

Versions: 52

Compression:

Stored size: 952 Bytes

Contents

desc 'update', 'Bring a project up to date'
long_desc <<-LONGDESC
Example: `geordi update`

Performs: `git pull`, `bundle install` (if necessary) and migrates (if applicable).

After updating, loads a dump into the development db when called with the
`--dump` option:

    geordi update -d staging

After updating, runs all tests when called with the `--test` option:

    geordi update -t

See `geordi help update` for details.
LONGDESC

option :dump, :type => :string, :aliases => '-d', :banner => 'TARGET',
  :desc => 'After updating, dump the TARGET db and source it into the development db'
option :test, :type => :boolean, :aliases => '-t', :desc => 'After updating, run tests'

def update
  announce 'Updating repository'
  Util.system! 'git pull', :show_cmd => true

  invoke_cmd 'migrate'

  success 'Successfully updated the project.'

  invoke_cmd 'dump', options.dump, :load => true if options.dump
  invoke_cmd 'tests' if options.test
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
geordi-2.12.3 lib/geordi/commands/update.rb
geordi-2.12.2 lib/geordi/commands/update.rb
geordi-2.12.1 lib/geordi/commands/update.rb
geordi-2.12.0 lib/geordi/commands/update.rb
geordi-2.11.0 lib/geordi/commands/update.rb
geordi-2.10.1 lib/geordi/commands/update.rb
geordi-2.10.0 lib/geordi/commands/update.rb
geordi-2.9.0 lib/geordi/commands/update.rb
geordi-2.8.0 lib/geordi/commands/update.rb
geordi-2.7.0 lib/geordi/commands/update.rb
geordi-2.6.0 lib/geordi/commands/update.rb
geordi-2.5.0 lib/geordi/commands/update.rb
geordi-2.4.0 lib/geordi/commands/update.rb
geordi-2.3.0 lib/geordi/commands/update.rb
geordi-2.2.0 lib/geordi/commands/update.rb
geordi-2.1.0 lib/geordi/commands/update.rb
geordi-2.0.0 lib/geordi/commands/update.rb
geordi-1.10.0 lib/geordi/commands/update.rb
geordi-1.9.1 lib/geordi/commands/update.rb
geordi-1.9.0 lib/geordi/commands/update.rb