Class: Roger::Release::Finalizers::Dir
- Defined in:
- lib/roger/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 Roger::Release::Finalizers::Base
Instance Method Details
#call(release, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/roger/release/finalizers/dir.rb', line 10 def call(release, = {}) = {}.update(@options) .update() if name = [([:prefix] || "html"), release.scm.version].join("-") target_path = release.target_path + name release.log(self, "Finalizing release to #{target_path}") if File.exist?(target_path) release.log(self, "Removing existing target #{target_path}") FileUtils.rm_rf(target_path) end FileUtils.cp_r release.build_path, target_path end |