cocoapods-xcremotecache 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 359dfd9fb48e07a331b72fa8577d2405ef314f74da80e70a10ba1b215dce31ca
|
4
|
+
data.tar.gz: b6fe29ac1c506afdf58a6371f43f6f956b110ee1e5e55e2c489241032e349d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1695e333fc0c7e93513271cd62297579acd0f5f3ced03ff610942969ce631186538b7265e4b29408219974b2ac53f4ca17c514522a9ee7315c6822dfb7d09a62
|
7
|
+
data.tar.gz: 480b2222e66937897e1a5e9157bde4985a9a9531301d76906553e3c7ac5856b04d417224d428ded3cc4b3cf9bc5a044f461471afaacb14f63ed4f214d73ff543
|
@@ -26,6 +26,7 @@ module CocoapodsXCRemoteCacheModifier
|
|
26
26
|
FAKE_SRCROOT = "/#{'x' * 10 }"
|
27
27
|
LLDB_INIT_COMMENT="#RemoteCacheCustomSourceMap"
|
28
28
|
LLDB_INIT_PATH = "#{ENV['HOME']}/.lldbinit"
|
29
|
+
FAT_ARCHIVE_NAME_INFIX = 'arm64-x86_64'
|
29
30
|
|
30
31
|
CUSTOM_CONFIGURATION_KEYS = [
|
31
32
|
'enabled',
|
@@ -196,15 +197,18 @@ module CocoapodsXCRemoteCacheModifier
|
|
196
197
|
release_url = 'https://api.github.com/repos/spotify/XCRemoteCache/releases/latest'
|
197
198
|
asset_url = nil
|
198
199
|
|
199
|
-
open(release_url
|
200
|
-
|
200
|
+
URI.open(release_url) do |f|
|
201
|
+
assets_array = JSON.parse(f.read)['assets']
|
202
|
+
# Pick fat archive
|
203
|
+
asset_array = assets_array.detect{|arr| arr['name'].include?(FAT_ARCHIVE_NAME_INFIX)}
|
204
|
+
asset_url = asset_array['url']
|
201
205
|
end
|
202
206
|
|
203
207
|
if asset_url.nil?
|
204
208
|
throw "Downloading XCRemoteCache failed"
|
205
209
|
end
|
206
210
|
|
207
|
-
open(asset_url,
|
211
|
+
URI.open(asset_url, "accept" => 'application/octet-stream') do |f|
|
208
212
|
File.open(local_package_location, "wb") do |file|
|
209
213
|
file.puts f.read
|
210
214
|
end
|