Sha256: fe3baf64d78f3312041b9d47e6604bc43c8735ef999c3f240c1b77f9930e1581

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

Capistrano::Configuration.instance.load do
  namespace :multiproject do
    desc "[internal] Generate arteficial any_server role that enumerates all known servers"
    task :any_server_role do
      project_roles_sym = project_roles.map { |o| o.to_sym }
      servers = roles.values.map { |o| o.servers }.map { |o| o.to_s }.flatten.sort.uniq
#      ruby 1.8 hates having hash after expanding array, while 1.9 is totally cool with that
#      top.role(:any_server, *servers, { :no_release => true })
      servers.each { |s| top.server s, :any_server, :no_release => true }
    end
  end

  on :start, 'multiproject:any_server_role', :except => (projects + stages + %w(?))
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capistrano-multiproject-0.0.4 lib/capistrano/multiproject/any_server_role.rb
capistrano-multiproject-0.0.3 lib/capistrano/multiproject/any_server_role.rb