cocoapods-binary-artifactory-cache 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42ed7befd74c7b8a6476d1991cd43f6820423be9e9eb1eee833bc81e5e552430
4
- data.tar.gz: 78769f4919e4f12bfbc242143112a0789dbc6af7877d4167599ffd1f9b1b2cf4
3
+ metadata.gz: c81f28251159e84f50cce2347d8dac69c76a4a31c00d8eac250cfbe6c0fcb0d9
4
+ data.tar.gz: 294f9d373ed0fa4f54575fc2299cc553924bfe8d0962ba83e45a8e9e3b1d3b0c
5
5
  SHA512:
6
- metadata.gz: 1554ba2b5f40b672e9bf65e1ba1b8843b2df279215ff814bf9a857958e57c1bda914be6f679831435052c8d963de9cffa6ecdf16a826d40db59b6429e4905fe6
7
- data.tar.gz: 97e647ad6316a599216dadb7e3515d89feeda9acb8f5e20a7175cefec1910226af13e3f3ce7beee7d1ae8edcb30b768c508213606581235e1a345312df5bca69
6
+ metadata.gz: 59ed833ee18b74cdb0e551fa4dd1425820ded229428d3c083f438d22c788df127b5c844be0d717bbfd0fb87ea0b853fc2726ea89f0707d4381d20aa3145aa4b1
7
+ data.tar.gz: c6bd5ffe529e9ac201b44db6b71bb95cfc7d0838cddbd3ec141f0c72b9a511e5d06bdda4c1428340c59a550f6be789abc005d093c50cafa0853d8c1d27e170a1
@@ -30,7 +30,7 @@ module PodPrebuild
30
30
  collect_output(target, Dir[target_products_dir_of(target, sdks[0]) + "/*"])
31
31
  end
32
32
  end
33
- # fix_swiftinterface_files(targets)
33
+ fix_swiftinterface_files(targets)
34
34
  end
35
35
 
36
36
  private
@@ -133,17 +133,16 @@ module PodPrebuild
133
133
  escapedPod = target.product_module_name.gsub('/', '\/')
134
134
  # replace when framework and class in framework with the same name
135
135
  replaceString1 = "-e '/^import/! s/ #{escapedPod}\\./ /g'" #remove framework name in swiftinterface of it frameworkd
136
- replaceString2 = "-e 's/\(#{escapedPod}\\./(/g'"
137
- replaceString3 = "-e 's/\\[#{escapedPod}\\./[/g'"
138
- replaceString4 = "-e 's/<#{escapedPod}\\./</g'"
139
- Pod::UI.puts_indented "$ find '#{output_path(target)}/#{target.product_module_name}.xcframework' -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} #{replaceString4} {} \\\;"
140
- `find "#{output_path(target)}/#{target.product_module_name}.xcframework" -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} #{replaceString4} {} \\\;`
136
+ replaceString2 = "-e 's/#{escapedPod}\\.#{escapedPod}\\./#{escapedPod}\\./g'"
137
+ replaceString3 = "-e 's/#{escapedPod}\\.//g'"
138
+ Pod::UI.puts_indented "$ find '#{output_path(target)}/#{target.product_module_name}.xcframework' -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} {} \\\;"
139
+ `find "#{output_path(target)}/#{target.product_module_name}.xcframework" -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} {} \\\;`
141
140
  end
142
- #remove dublication name in other frameworks
143
- allDirTargets = Dir["#{@options[:output_path]}/*"].map { |x| x.gsub("#{@options[:output_path]}/", "") }
144
- replaceString = allDirTargets.uniq().map{ |x| x.gsub('/', '\/')}.map{|x| "-e 's/#{x}\\.#{x}/#{x}/g'"}.join(' ')
145
- Pod::UI.puts_indented "$ find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;"
146
- `find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;`
141
+ # #remove dublication name in other frameworks
142
+ # allDirTargets = Dir["#{@options[:output_path]}/*"].map { |x| x.gsub("#{@options[:output_path]}/", "") }
143
+ # replaceString = allDirTargets.uniq().map{ |x| x.gsub('/', '\/')}.map{|x| "-e 's/#{x}\\.#{x}/#{x}/g'"}.join(' ')
144
+ # Pod::UI.puts_indented "$ find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;"
145
+ # `find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;`
147
146
  end
148
147
 
149
148
  def create_fat_framework(target)
@@ -10,6 +10,7 @@ module PodPrebuild
10
10
  def initialize(options)
11
11
  super(options)
12
12
  @repo_update = options[:repo_update]
13
+ @unpack_mutex = Mutex.new
13
14
  end
14
15
 
15
16
  def run
@@ -43,7 +44,7 @@ module PodPrebuild
43
44
  end
44
45
  end
45
46
  cache_paths = @resolved_targets.map {|target| "/#{target.name}/#{target.version}.zip"}
46
- Parallel.each(cache_paths, in_threads: 8) do |path|
47
+ Parallel.each(cache_paths, in_threads: 4) do |path|
47
48
  cache_path = @config.generated_frameworks_dir(in_cache: true) + path
48
49
  if File.exists?(cache_path) == false || File.zero?(cache_path) == true
49
50
  File.open(cache_path, "wb") do |file|
@@ -80,9 +81,14 @@ module PodPrebuild
80
81
  )
81
82
  end
82
83
  zip_paths = @resolved_targets.map {|target| @config.generated_frameworks_dir(in_cache: true) + "/#{target.name}/#{target.version}.zip"}
83
- Parallel.each(zip_paths, in_threads: 8) do |path|
84
+ Parallel.each(zip_paths, in_threads: 4) do |path|
84
85
  if File.exists? path
85
- ZipUtils.unzip(path, to_dir: @config.generated_frameworks_dir)
86
+ @unpack_mutex.synchronize do
87
+ unless ZipUtils.unzip(path, to_dir: @config.generated_frameworks_dir)
88
+ File.delete(path)
89
+ Pod::UI.puts "Remove bad archive #{path}".yellow
90
+ end
91
+ end
86
92
  end
87
93
  end
88
94
  end
@@ -17,9 +17,11 @@ module PodPrebuild
17
17
 
18
18
  def self.unzip(path, to_dir: nil)
19
19
  cmd = []
20
- cmd << "unzip -nq" << path
20
+ cmd << "unzip -oq" << path
21
21
  cmd << "-d" << to_dir unless to_dir.nil?
22
22
  `#{cmd.join(" ")}`
23
+ if $? != 0 then return false
24
+ return true
23
25
  end
24
26
  end
25
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-binary-artifactory-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Antropov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2022-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods