44require_relative 'helper/path_utils'
55
66class PrebuildOutput
7- def initialize ( prebuildSandbox )
8- @sandbox = prebuildSandbox
7+ def initialize ( prebuild_sandbox )
8+ @sandbox = prebuild_sandbox
99 end
1010
1111 def delta_dir
12- return "#{ @sandbox . root } /../_Prebuild_delta"
12+ "#{ @sandbox . root } /../_Prebuild_delta"
1313 end
1414
1515 def delta_file_path
16- return "#{ delta_dir } /changes.txt"
16+ "#{ delta_dir } /changes.txt"
1717 end
1818
1919 def clean_delta_file
2020 puts "clean_delta_file: #{ delta_file_path } "
21- FileUtils . remove_entry ( delta_file_path , force = true )
21+ FileUtils . remove_entry ( delta_file_path , force = true )
2222 end
2323
2424 def create_dir_if_needed ( dir )
@@ -36,7 +36,7 @@ def write_delta_file(updated, deleted)
3636 end
3737 puts "Pod prebuild changes were writen to file: #{ file_path } "
3838 else
39- puts " No changes in prebuild"
39+ puts ' No changes in prebuild'
4040 end
4141 end
4242
@@ -47,22 +47,20 @@ def process_prebuilt_dev_pods
4747
4848 # Inject project path (where the framework is built) to support generating code coverage later
4949 project_root = PathUtils . remove_last_path_component ( @sandbox . standard_sanbox_path . to_s )
50- template_file_path = devpod_output_path + " prebuilt_map"
50+ template_file_path = devpod_output_path + ' prebuilt_map'
5151 File . open ( template_file_path , 'w' ) do |file |
5252 file . write ( project_root )
5353 end
5454
5555 Pod ::Prebuild ::CacheInfo . cache_miss_dev_pods_dic . each do |name , hash |
5656 puts "Output dev pod lib: #{ name } hash: #{ hash } "
5757 built_lib_path = @sandbox . framework_folder_path_for_target_name ( name )
58- if File . directory? ( built_lib_path )
59- FileUtils . cp ( template_file_path , "#{ built_lib_path } /#{ name } .framework" )
58+ next unless File . directory? ( built_lib_path )
6059
61- target_dir = "#{ devpod_output_path } #{ name } _ #{ hash } "
62- puts "From: #{ built_lib_path } -> #{ target_dir } "
63- FileUtils . cp_r ( built_lib_path , target_dir )
64- end
60+ FileUtils . cp ( template_file_path , "#{ built_lib_path } / #{ name } .framework" )
61+ target_dir = " #{ devpod_output_path } #{ name } _ #{ hash } "
62+ puts "From: #{ built_lib_path } -> #{ target_dir } "
63+ FileUtils . cp_r ( built_lib_path , target_dir )
6564 end
66-
6765 end
68- end
66+ end
0 commit comments