Module: Stage
- Defined in:
- lib/canuby/util.rb
Overview
Staging related methods
Class Method Summary collapse
-
.clean(project) ⇒ Object
Delete all staged files from a project.
-
.collect(project, verbosity = 'm') ⇒ Object
Collect all stage files from a project.
Class Method Details
.clean(project) ⇒ Object
Delete all staged files from a project
206 207 208 |
# File 'lib/canuby/util.rb', line 206 def self.clean(project) const_get(project).outputs.each { |f| rm f if File.exist?(f) } end |
.collect(project, verbosity = 'm') ⇒ Object
Collect all stage files from a project
211 212 213 214 215 216 217 218 219 |
# File 'lib/canuby/util.rb', line 211 def self.collect(project, verbosity = 'm') logger.info("Staging #{project}...") unless verbosity == 'q' Paths.create if const_get(project).output_dir.nil? const_get(project).outputs.map { |f| cp File.join(Paths.build_dir(project), ENV['rel_type'], f), Paths.stage_dir } else const_get(project).outputs.map { |f| cp File.join(const_get(project).output_dir, ENV['rel_type'], f), Paths.stage_dir } end end |