Sha256: a45adcc2c133a678dabb8029f076862909cdde4328690fd3bb1596241cb21532

Contents?: true

Size: 668 Bytes

Versions: 39

Compression:

Stored size: 668 Bytes

Contents

desc 'capistrano COMMAND', 'Run a capistrano command on all deploy targets'
long_desc <<-LONGDESC
Example: `geordi capistrano deploy`
LONGDESC

def capistrano(*args)
  targets = Dir['config/deploy/*.rb'].map { |file| File.basename(file, '.rb') }.sort

  note 'Found the following deploy targets:'
  puts targets
  prompt('Continue?', 'n', /y|yes/) or fail 'Cancelled.'

  targets << nil if targets.empty? # default target
  targets.each do |stage|
    announce 'Target: ' + (stage || '(default)')

    command = "bundle exec cap #{stage} " + args.join(' ')
    note_cmd command

    Util.system!(command, :fail_message => 'Capistrano failed. Have a look!')
  end

end

Version data entries

39 entries across 39 versions & 1 rubygems

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