Class: Ploy::Publisher

Inherits:
Object
  • Object
show all
Defined in:
lib/ploy/publisher.rb

Instance Method Summary collapse

Constructor Details

#initialize(conf_source) ⇒ Publisher

Returns a new instance of Publisher.



5
6
7
# File 'lib/ploy/publisher.rb', line 5

def initialize(conf_source)
  @configs = Ploy::LocalPackage::Config.load(conf_source)
end

Instance Method Details

#publishObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ploy/publisher.rb', line 9

def publish
  remotes = []
  @configs.each do |config|
    pkgpath = config.builder.build_deb
    remote_package = config.remote_package
    remote_package.upload(pkgpath)
    remote_package.make_current
    remotes.push(remote_package)
  end
  return remotes
end