Sha256: 60ea7116be7b17281cb3436b20c347ed0eac18ad7cacf05ad865a1219ef75454

Contents?: true

Size: 722 Bytes

Versions: 29

Compression:

Stored size: 722 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

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

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

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

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

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
geordi-9.5.1 lib/geordi/commands/capistrano.rb
geordi-9.5.0 lib/geordi/commands/capistrano.rb
geordi-9.4.1 lib/geordi/commands/capistrano.rb
geordi-9.4.0 lib/geordi/commands/capistrano.rb
geordi-9.3.1 lib/geordi/commands/capistrano.rb
geordi-9.3.0 lib/geordi/commands/capistrano.rb
geordi-9.2.0 lib/geordi/commands/capistrano.rb
geordi-9.1.0 lib/geordi/commands/capistrano.rb
geordi-9.0.0 lib/geordi/commands/capistrano.rb
geordi-8.0.0 lib/geordi/commands/capistrano.rb
geordi-7.0.2 lib/geordi/commands/capistrano.rb
geordi-7.0.1 lib/geordi/commands/capistrano.rb
geordi-7.0.0 lib/geordi/commands/capistrano.rb
geordi-6.1.0 lib/geordi/commands/capistrano.rb
geordi-6.0.1 lib/geordi/commands/capistrano.rb
geordi-6.0.0 lib/geordi/commands/capistrano.rb
geordi-6.0.0.pre.rc1 lib/geordi/commands/capistrano.rb
geordi-5.4.0 lib/geordi/commands/capistrano.rb
geordi-5.3.0 lib/geordi/commands/capistrano.rb
geordi-5.2.4 lib/geordi/commands/capistrano.rb