lib/jets/builders/code_builder.rb
# Copy project into temporary directory. Do this so we can keep the project
# directory untouched and we can also remove a bunch of unnecessary files like
# logs before zipping it up.
Copy project into temporary directory. Do this so we can keep the project
directory untouched and we can also remove a bunch of unnecessary files like
logs before zipping it up.
Copy project into temporary directory . Do this so we can keep the project directory untouched and we can also remove a bunch of unnecessary files like logs before zipping it up .
def copy_project
      headline "Copying current project directory to temporary build area: #{full(tmp_code)}"
      FileUtils.rm_rf(stage_area) 
      FileUtils.mkdir_p(stage_area)
      FileUtils.rm_rf(full(tmp_code)) 
      move_node_modules(Jets.root, Jets.build_root)
      begin
        FileUtils.cp_r(@full_project_path, full(tmp_code))
      ensure
        move_node_modules(Jets.build_root, Jets.root) 
      end
    end
def copy_project headline "Copying current project directory to temporary build area: #{full(tmp_code)}" FileUtils . rm_rf ( stage_area ) FileUtils . mkdir_p ( stage_area ) FileUtils . rm_rf ( full ( tmp_code ) ) move_node_modules ( Jets . root , Jets . build_root ) begin FileUtils . cp_r ( @full_project_path , full ( tmp_code ) ) ensure move_node_modules ( Jets . build_root , Jets . root ) end end
Copy project into temporary directory.
Copy project into temporary directory .
# clear out from previous build # remove current code folder # puts "cp -r #{@full_project_path} #{full(tmp_code)}".colorize(:yellow) # uncomment to debug # move node_modules directory back