Class: HtmlMockup::Release::Finalizers::Dir
- Defined in:
- lib/html_mockup/release/finalizers/dir.rb
Overview
Finalizes the release into a directory in target_path
The directory name will have the format PREFIX-VERSION
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from HtmlMockup::Release::Finalizers::Base
Instance Method Details
#call(release, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/html_mockup/release/finalizers/dir.rb', line 11 def call(release, = {}) if = @options.dup.update() else = @options end name = [([:prefix] || "html"), release.scm.version].join("-") release.log(self, "Finalizing release to #{release.target_path + name}") if File.exist?(release.target_path + name) release.log(self, "Removing existing target #{release.target_path + name}") FileUtils.rm_rf(release.target_path + name) end FileUtils.cp_r release.build_path, release.target_path + name end |