cocoapods-alexandria 0.2.4 → 0.2.7

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: 53a4f9bbe821077493e3ed28b9498c8d354568a5d1db2b21325a410f01ac9174
4
- data.tar.gz: dc38d21a6c95984c84398423813359c35f9c38c1d10acfff3ec1ec568749f97c
3
+ metadata.gz: 88c734b77b85da1fbb9ddc69826b130f6f5419e672c8932e74c4b7a23577cc07
4
+ data.tar.gz: 1d965cef559cf052def03664683e0cad21c2dd86bfc365cd9ee36c1b458b078e
5
5
  SHA512:
6
- metadata.gz: 2bd60a0217002b5c9301f3ccc9cc72dffec098f5aacd479a630aa13cdcf531c53126717b3baf745a8690ac9fb6d0d22607bf1a5a2cfbf8586f9ccbf013eb277f
7
- data.tar.gz: c99fd46bf20edd1e1c96ebae578d555fe761c2488e04bea00b37bfc595df310f0f200b5b253cc6e4dc1b1a655110dc00611707655fefd01254b97874eef63abf
6
+ metadata.gz: 959811b22d97086ed29852dda0d8d30b42cc94384312018f3c20e7797c78591b040cdd4e0d8d939d1e0c4c24469c528a0303b4feaa03af8753d4557aefbbc3b5
7
+ data.tar.gz: 0e9109a517111fea85644ec751136e0676d130b5f345e7d1e0de9809e7a3895e6e6b7ea443a8a7c227903b3515237efee730547752d0d902c37b241c92ad0f52
@@ -1,3 +1,3 @@
1
1
  module CocoapodsAlexandria
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.7'
3
3
  end
@@ -22,10 +22,13 @@ module PodAlexandria
22
22
 
23
23
  # may already be built (by another target)
24
24
  if File.directory?(build_path(target, sdk))
25
- build_path(target, sdk)
25
+ Pod::UI.puts "Already built '#{target.name}', probably by another dependency."
26
26
  else
27
+ Pod::UI.puts "Building '#{target.name}' for #{sdk}..."
27
28
  xcodebuild(target, sdk, deployment_target)
28
29
  end
30
+
31
+ build_path(target, sdk)
29
32
  }.compact
30
33
  end
31
34
 
@@ -36,18 +39,14 @@ module PodAlexandria
36
39
  end
37
40
 
38
41
  def skip_build?(target, sdk)
39
- File.directory?(destination_path(target)) ||
40
- File.directory?(build_path(target, sdk))
42
+ File.directory?(destination_path(target))
41
43
  end
42
44
 
43
45
  def xcodebuild(target, sdk, deployment_target)
44
46
  args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target.name} -configuration #{configuration} -sdk #{sdk})
45
47
  args += flags unless flags.nil?
46
48
 
47
- Pod::UI.puts "Building '#{target.name}' for #{sdk}..."
48
49
  Pod::Executable.execute_command 'xcodebuild', args, true
49
-
50
- build_path(target, sdk)
51
50
  end
52
51
 
53
52
  def project
@@ -55,11 +54,15 @@ module PodAlexandria
55
54
  end
56
55
 
57
56
  def build_path(target, sdk)
58
- "#{build_dir}/#{configuration}-#{sdk}/#{target.name}/#{target.product_name}.framework"
57
+ # Note: using target.product_name is wrong in some cases (Cocoapods project generation bug)
58
+ # See https://github.com/CocoaPods/CocoaPods/issues/8007
59
+ "#{build_dir}/#{configuration}-#{sdk}/#{target.name}/#{target.product_reference.name}"
59
60
  end
60
61
 
61
62
  def destination_path(target)
62
- "#{destination}/#{target.product_name}.framework"
63
+ # Note: using target.product_name is wrong in some cases (Cocoapods project generation bug)
64
+ # See https://github.com/CocoaPods/CocoaPods/issues/8007
65
+ "#{destination}/#{target.product_reference.name}"
63
66
  end
64
67
  end
65
68
  end
@@ -90,12 +90,12 @@ module PodAlexandria
90
90
 
91
91
  def delete(spec)
92
92
  name = spec_modules[spec] || module_name(spec)
93
- paths = Dir["#{destination}/#{name}.{framework,xcframework}"]
93
+ paths = Dir["#{destination}/#{name}.{a,framework,xcframework}"]
94
94
 
95
95
  if !paths.empty?
96
- paths.each { |path| FileUtils.remove_dir(path, true) }
96
+ paths.each { |path| FileUtils.remove_entry(path, true) }
97
97
  else
98
- Pod::UI.warn "🤔 Could not delete #{destination}/#{name}.(xc)framework, it does not exist! (this is normal for newly added pods)"
98
+ Pod::UI.warn "🤔 Could not delete cached binary for #{name}, it does not exist! (this is normal for newly added pods)"
99
99
  end
100
100
  end
101
101
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-alexandria
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Jennes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-02 00:00:00.000000000 Z
11
+ date: 2022-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods