Class: Roger::Release::Finalizers::Zip
- Inherits:
-
Base
- Object
- Processors::Base
- Base
- Roger::Release::Finalizers::Zip
- Defined in:
- lib/roger/release/finalizers/zip.rb
Overview
The zip finalizer
Instance Attribute Summary
Attributes inherited from Processors::Base
Instance Method Summary collapse
Methods inherited from Processors::Base
Instance Method Details
#default_options ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/roger/release/finalizers/zip.rb', line 10 def { zip: "zip", prefix: "html", target_path: release.target_path } end |
#perform ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/roger/release/finalizers/zip.rb', line 18 def perform target_path = ensure_target_path(@options[:target_path]) name = [[:prefix], @release.scm.version].join("-") + ".zip" zip_path = target_path + name @release.log(self, "Finalizing release to #{zip_path}") cleanup_existing_zip(zip_path) check_zip_command(@options[:zip]) ::Dir.chdir(@release.build_path) do `#{@options[:zip]} -r -9 "#{zip_path}" ./*` end end |