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