Sha256: cfd1ae310feaf322f111cc8d965add811bb486af6a8aa2de01eae813e137a186
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
desc 'all-targets COMMAND', 'Run a capistrano command on all deploy targets' long_desc <<-LONGDESC Example: `geordi all-targets deploy` LONGDESC def all_targets(*args) targets = Dir['config/deploy/*.rb'].map { |file| File.basename(file, '.rb') }.sort note 'Found the following deploy targets:' puts targets puts print 'Continue? [yN] ' exit unless $stdin.gets =~ /[yes]+/ 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geordi-1.0.0 | lib/geordi/commands/all_targets.rb |