cocoapods-binary-artifactory-cache 0.0.1 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad656efb61549cc4f65cf109b853007db01c4a2625a7d6ed5fe94902f0a7d4aa
4
- data.tar.gz: c971b1d3cefe38ef1c114f66ec3a70a2d95c4e52740b94a54626d3300d62eebb
3
+ metadata.gz: 5d1634b0e687b99b494362bd28507719a74386d6c8d7706ab6c0b2e41a745fac
4
+ data.tar.gz: f4077e2f6fc2d9034e6fdb0d489badae12be729ad53424bb77978a60d9bf89d8
5
5
  SHA512:
6
- metadata.gz: 1a49d25c9b603fb1bcddb5090b09300caa1e81c921c7db76b163ecf662fb8faa884581ea64793ab582c1b47a790509b20e1d9a7859d709ed58fb1ab8220f2f45
7
- data.tar.gz: 6b32b0db4b702fe72e3931914d10ec121633f769aa95855afc7e98a6447a9883e5d2c51a541e55b4358f95a41ca9655d782388eec4712ca3c74f30d7e0f14d54
6
+ metadata.gz: 1ed57ea5c330b425b2673e32a82475a2c580de43a6fe8af0c38961e3f8851ea15a0e5bbbb5cb6eaec227bcd76248bbfe1746c9722233784c4ec97bdc1b5a6a86
7
+ data.tar.gz: 9d57ddfa6a7557de65d0f41039874057612dd29097c19840883a2670a480d9deb39760f382ce1a0665db6a57de120492e1a1dfd15f6fe5e73dc7fd87dd12528c
@@ -30,6 +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
34
  end
34
35
 
35
36
  private
@@ -66,7 +67,9 @@ module PodPrebuild
66
67
  args_[:simulator] ||= []
67
68
  args_[:device] ||= []
68
69
  args_[:default].prepend("BITCODE_GENERATION_MODE=bitcode") if bitcode_enabled?
70
+ args_[:default].prepend("DEBUG_INFORMATION_FORMAT=dwarf-with-dsym") unless disable_dsym?
69
71
  args_[:default].prepend("DEBUG_INFORMATION_FORMAT=dwarf") if disable_dsym?
72
+ args_[:default].prepend("BUILD_LIBRARY_FOR_DISTRIBUTION=YES")
70
73
  args_[:simulator].prepend("ARCHS=x86_64", "ONLY_ACTIVE_ARCH=NO") if simulator == "iphonesimulator"
71
74
  args_[:simulator] += args_[:default]
72
75
  args_[:device].prepend("ONLY_ACTIVE_ARCH=NO")
@@ -123,6 +126,21 @@ module PodPrebuild
123
126
  `#{cmd.join(" ")}`
124
127
  end
125
128
 
129
+ def fix_swiftinterface_files(targets)
130
+ targets.each do |target|
131
+ escapedPod = target.product_module_name.gsub('/', '\/')
132
+ # replace when framework and class in framework with the same name
133
+ replaceString1 = "-e '/^import/! s/ #{escapedPod}\\./ /g'" #remove framework name in swiftinterface of it frameworkd
134
+ replaceString2 = "-e 's/\(#{escapedPod}\\./(/g'"
135
+ replaceString3 = "-e 's/\\[#{escapedPod}\\./[/g'"
136
+ replaceString4 = "-e 's/<#{escapedPod}\\./</g'"
137
+ `find "#{output_path(target)}/#{target.product_module_name}.xcframework" -name '*.swiftinterface' -exec sed -i -e #{replaceString1} #{replaceString2} #{replaceString3} #{replaceString4} {} \\\;`
138
+ end
139
+ #remove dublication name in other frameworks
140
+ replaceString = targets.map { |x| x.product_module_name }.uniq().map{ |x| x.gsub('/', '\/')}.map{|x| "-e 's/#{x}\\.#{x}/#{x}/g'"}.join(' ')
141
+ `find #{@options[:output_path]} -name '*.swiftinterface' -exec sed -i -e #{replaceString} {} \\\;`
142
+ end
143
+
126
144
  def create_fat_framework(target)
127
145
  # When merging contents of `simulator` & `device`, prefer contents of `device` over `simulator`
128
146
  # https://github.com/grab/cocoapods-binary-cache/issues/25
@@ -9,6 +9,7 @@ module PodPrebuild
9
9
 
10
10
  def initialize(options)
11
11
  super(options)
12
+ @repo_update = options[:repo_update]
12
13
  end
13
14
 
14
15
  def run
@@ -20,7 +21,7 @@ module PodPrebuild
20
21
  lockfile: installer.lockfile,
21
22
  cache_validation: nil
22
23
  )
23
-
24
+ @binary_installer.repo_update = @repo_update
24
25
  Pod::UI.title("Generate Manifest") do
25
26
  @binary_installer.clean_delta_file
26
27
  @binary_installer.install!
data/lib/command/fetch.rb CHANGED
@@ -6,11 +6,17 @@ module Pod
6
6
  class Binary < Command
7
7
  class Fetch < Binary
8
8
  self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
9
+ def self.options
10
+ [
11
+ ["--repo-update", "Update pod repo before installing"]
12
+ ].concat(super)
13
+ end
14
+
9
15
  def initialize(argv)
10
16
  super
11
17
  unless ENV['ARTIFACTORY_LOGIN'].nil? && ENV['ARTIFACTORY_PASSWORD'].nil?
12
18
  update_cli_config(
13
- :artifactory_login => ENV['CI_ARTIFACTORY_LOGIN'],
19
+ :artifactory_login => ENV['ARTIFACTORY_LOGIN'],
14
20
  :artifactory_password => ENV['ARTIFACTORY_PASSWORD']
15
21
  )
16
22
  else
@@ -28,6 +34,7 @@ module Pod
28
34
  )
29
35
  @fetcher = PodPrebuild::CacheFetcher.new(
30
36
  config: prebuild_config,
37
+ repo_update: argv.flag?("repo-update")
31
38
  )
32
39
  end
33
40
 
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.1
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Antropov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-17 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  requirements: []
202
- rubygems_version: 3.0.3.1
202
+ rubygems_version: 3.3.5
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: Reduce build time by building pod frameworks and cache it in artifactory