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