Module: MetaRake::Publisher::Freight
- Extended by:
- Magic
- Defined in:
- lib/metarake/publisher/freight.rb
Overview
Metarake publisher that pushes ‘.deb` Debian packages to a Freight apt repository (github.com/rcrowley/freight).
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#publish! ⇒ Object
Add files to the freight repo and publish them.
-
#published? ⇒ Boolean
True if all project targets are added to the repository.
Methods included from Magic
Instance Method Details
#publish! ⇒ Object
Add files to the freight repo and publish them
39 40 41 42 43 44 45 46 |
# File 'lib/metarake/publisher/freight.rb', line 39 def publish! self.targets.each do |tgt| sh *(freight_command('add') + [ File.join(self.to_s, tgt), "apt/#{self.class.freight_distro}" ]) end sh *(freight_command('cache')) end |
#published? ⇒ Boolean
True if all project targets are added to the repository
31 32 33 34 35 36 |
# File 'lib/metarake/publisher/freight.rb', line 31 def published? raise "#{self.class}.freight_distro is not set" unless self.class.freight_distro self.targets.map { |tgt| File.exist?(File.join( self.class.freight_varlib, 'apt', self.class.freight_distro, tgt)) }.all? end |