Sha256: 403f2e9162fc6537352a8160d9a64648afe5b8e4a6d20a5f72bd1e00a8375c30
Contents?: true
Size: 725 Bytes
Versions: 8
Compression:
Stored size: 725 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.system!(command, fail_message: 'Capistrano failed. Have a look!') end end
Version data entries
8 entries across 8 versions & 1 rubygems