lib/cocoapods-ppbuild/Integration.rb in cocoapods-ppbuild-1.0.1 vs lib/cocoapods-ppbuild/Integration.rb in cocoapods-ppbuild-1.0.2

- old
+ new

@@ -49,11 +49,14 @@ else if File.directory?(source) FileUtils.cp_r source, target, :remove_destination => true else FileUtils.cp source, target - end + end + if not target.exist? + raise "资源导入失败:#{target}" + end end end def mirror_with_symlink(source, basefolder, target_folder, uselink) target = target_folder + source.relative_path_from(basefolder) @@ -72,12 +75,11 @@ if target_names.count > 1 target_folder += real_file_folder.basename end target_folder.rmtree if target_folder.exist? target_folder.mkpath - - + walk(real_file_folder) do |child| source = child # only make symlink to file and `.framework` folder if child.directory? @@ -281,9 +283,14 @@ if spec.attributes_hash["resource_bundles"] bundle_names = spec.attributes_hash["resource_bundles"].keys spec.attributes_hash["resource_bundles"] = nil spec.attributes_hash["resources"] ||= [] spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"} + elsif spec.attributes_hash['ios']["resource_bundles"] + bundle_names = spec.attributes_hash['ios']["resource_bundles"].keys + spec.attributes_hash['ios']["resource_bundles"] = nil + spec.attributes_hash['ios']["resources"] ||= [] + spec.attributes_hash['ios']["resources"] += bundle_names.map{|n| n+".bundle"} end # to avoid the warning of missing license spec.attributes_hash["license"] = {} \ No newline at end of file