pod-builder 0.7.0 → 0.7.1
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 +4 -4
- data/README.md +4 -1
- data/lib/pod_builder/command/update.rb +2 -0
- data/lib/pod_builder/info.rb +33 -11
- data/lib/pod_builder/install.rb +1 -0
- data/lib/pod_builder/podfile_item.rb +15 -1
- data/lib/pod_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbade8908a2a47bc73d743c631c82a8ab251e13aaa7098bfda04972858de7d3d
|
4
|
+
data.tar.gz: cb1661a4210ea39c738c0cc1797e30ed663e446d83f235d9aa29bb498bfeaf79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 457db104594fad1b368e4b175e71cde10ac5ce54fe23b5add39e4f12751c8325bd1748aebb2218f2951372d4ddadcb41e9c4f19c361b0b6752e5fdf5dd7c2a59
|
7
|
+
data.tar.gz: 906ab6808e6f46d457139fe489427d73776414912a7039cd065246a263925c39b236b476a3d657429ec0eff9158dd13967cc52e812c699db708841f214be1de6
|
data/README.md
CHANGED
@@ -134,10 +134,13 @@ The output hash contains one key for each pod containing the following keys:
|
|
134
134
|
- `framework_path`: the expected path for the prebuilt framework
|
135
135
|
- `restore_info.version`: the expected version for the pod
|
136
136
|
- `restore_info.specs`: the expected list of specs for the pod
|
137
|
+
- `restore_info.is_static`: true if the expected pod produces a static framework
|
138
|
+
- `restore_info.swift_version`: the expected swift compiler version to prebuild pod
|
137
139
|
- `prebuilt_info`: some additional information about the the prebuilt framework, if it exists on disk
|
138
140
|
- `prebuilt_info.version`: the version of the pod that produced the current prebuilt framework
|
139
141
|
- `prebuilt_info.specs`: the specs of the pod that produced the current prebuilt framework (there might be multiple subspec that produce a single .framework)
|
140
|
-
- `
|
142
|
+
- `prebuilt_info.is_static`: true if the current prebuilt framework is static
|
143
|
+
- `prebuilt_info.swift_version`: the swift compiler version that produced the current prebuilt framework
|
141
144
|
|
142
145
|
**Version format**
|
143
146
|
|
data/lib/pod_builder/info.rb
CHANGED
@@ -19,23 +19,24 @@ module PodBuilder
|
|
19
19
|
|
20
20
|
swift_version = PodBuilder::system_swift_version
|
21
21
|
result = {}
|
22
|
-
|
22
|
+
name = nil
|
23
23
|
File.read(podspec_path).each_line do |line|
|
24
24
|
if (matches = line.match(/s.subspec '(.*)' do \|p\|/)) && matches.size == 2
|
25
|
-
|
26
|
-
elsif (matches = line.match(/p.vendored_frameworks = '(.*)'/)) && matches.size == 2
|
25
|
+
name = matches[1]
|
26
|
+
elsif (matches = line.match(/p.vendored_frameworks = '(.*)'/)) && matches.size == 2
|
27
27
|
path = matches[1].split("'").first
|
28
28
|
plist_path = File.join(PodBuilder::basepath(path), Configuration.framework_plist_filename)
|
29
|
-
|
30
|
-
name
|
31
|
-
|
32
|
-
# check if it's a subspec
|
33
|
-
if (subspec_items = podbuilder_name.split("_")) && (subspec = subspec_items.last) && subspec_items.count > 1
|
29
|
+
|
30
|
+
# fix name if it's a subspec
|
31
|
+
if (subspec_items = name.split("_")) && (subspec = subspec_items.last) && subspec_items.count > 1
|
34
32
|
if path.include?("/#{subspec}")
|
35
|
-
name =
|
33
|
+
name = name.sub(/_#{subspec}$/, "/#{subspec}")
|
36
34
|
end
|
37
35
|
end
|
38
|
-
|
36
|
+
|
37
|
+
base = PodBuilder::basepath.gsub(PodBuilder::home + "/", "")
|
38
|
+
framework_path = File.join(base, matches[1].split("'").first)
|
39
|
+
result[name] = { framework_path: framework_path }
|
39
40
|
|
40
41
|
specs = restore_podspecs(name.split("/").first, restore_content)
|
41
42
|
unless specs.count > 0
|
@@ -44,7 +45,11 @@ module PodBuilder
|
|
44
45
|
|
45
46
|
restore_line = restore_line(name, restore_content)
|
46
47
|
version = version_info(restore_line)
|
47
|
-
|
48
|
+
is_static = is_static(restore_line)
|
49
|
+
result[name].merge!({ "restore_info": { "version": version, "specs": specs, "is_static": is_static }})
|
50
|
+
if swift_version = swift_version(restore_line)
|
51
|
+
result[name][:restore_info].merge!({ "swift_version": swift_version })
|
52
|
+
end
|
48
53
|
|
49
54
|
prebuilt_info = prebuilt_info(plist_path)
|
50
55
|
if prebuilt_info.count > 0
|
@@ -86,6 +91,22 @@ module PodBuilder
|
|
86
91
|
raise "Failed extracting version from line:\n#{line}\n\n"
|
87
92
|
end
|
88
93
|
end
|
94
|
+
|
95
|
+
def self.swift_version(line)
|
96
|
+
return podbuilder_tag("sv", line)
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.is_static(line)
|
100
|
+
return podbuilder_tag("is", line)
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.podbuilder_tag(name, line)
|
104
|
+
if (matches = line&.match(/#{name}<(.*?)?>/)) && matches.size == 2
|
105
|
+
return matches[1]
|
106
|
+
end
|
107
|
+
|
108
|
+
return nil
|
109
|
+
end
|
89
110
|
|
90
111
|
def self.prebuilt_info(path)
|
91
112
|
unless File.exist?(path)
|
@@ -104,6 +125,7 @@ module PodBuilder
|
|
104
125
|
|
105
126
|
result.merge!({ "version": pod_version })
|
106
127
|
result.merge!({ "specs": (data["specs"] || []) })
|
128
|
+
result.merge!({ "is_static": (data["is_static"] || false) })
|
107
129
|
|
108
130
|
return result
|
109
131
|
end
|
data/lib/pod_builder/install.rb
CHANGED
@@ -99,6 +99,7 @@ module PodBuilder
|
|
99
99
|
subspecs_deps = specs.map(&:dependency_names).flatten
|
100
100
|
subspec_self_deps = subspecs_deps.select { |x| x.start_with?("#{podfile_item.root_name}/") }
|
101
101
|
plist_data['specs'] = (specs.map(&:name) + subspec_self_deps).uniq
|
102
|
+
plist_data['is_static'] = podfile_item.is_static
|
102
103
|
|
103
104
|
plist.value = CFPropertyList.guess(plist_data)
|
104
105
|
plist.save(podbuilder_file, CFPropertyList::List::FORMAT_BINARY)
|
@@ -262,7 +262,20 @@ module PodBuilder
|
|
262
262
|
end
|
263
263
|
|
264
264
|
if include_pb_entry && !is_prebuilt
|
265
|
-
|
265
|
+
plists = Dir.glob(PodBuilder::basepath("Rome/**/#{module_name}.framework/#{Configuration::framework_plist_filename}"))
|
266
|
+
if plists.count > 0
|
267
|
+
plist = CFPropertyList::List.new(:file => plists.first)
|
268
|
+
data = CFPropertyList.native_types(plist.value)
|
269
|
+
swift_version = data["swift_version"]
|
270
|
+
is_static = data["is_static"] || false
|
271
|
+
|
272
|
+
e += " # pb<#{name}> is<#{is_static}>"
|
273
|
+
if swift_version
|
274
|
+
e += " sv<#{swift_version}>"
|
275
|
+
end
|
276
|
+
else
|
277
|
+
e += " # pb<#{name}>"
|
278
|
+
end
|
266
279
|
end
|
267
280
|
|
268
281
|
return e
|
@@ -282,6 +295,7 @@ module PodBuilder
|
|
282
295
|
|
283
296
|
def prebuilt_entry(include_pb_entry = true)
|
284
297
|
relative_path = Pathname.new(Configuration.base_path).relative_path_from(Pathname.new(PodBuilder::project_path)).to_s
|
298
|
+
|
285
299
|
if Configuration.subspecs_to_split.include?(name)
|
286
300
|
entry = "pod 'PodBuilder/#{podspec_name}', :path => '#{relative_path}'"
|
287
301
|
else
|
data/lib/pod_builder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pod-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Camin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|