cocoapods-binaryhqp 0.4.8 → 0.4.9
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/.vscode/launch.json +2 -2
- data/lib/cocoapods-binaryhqp/Main.rb +2 -0
- data/lib/cocoapods-binaryhqp/Prebuild.rb +53 -11
- data/lib/cocoapods-binaryhqp/gem_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: 14566192d217044c6dc8d8b93af1d0296c14f092006c9880cf8beb689802cd34
|
4
|
+
data.tar.gz: 6e22703f0dad2e1f8cbdff851ad26d8b1033dd530e5c98c000e10d9900b65fcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc6a18e6324e3d5b6a37aed9a10c2477b3037752026439de9416fda800c234407b2cf3f8d9ac13496c14ab8a9dc588072d195ac508919c284a1a0d21b7773b6b
|
7
|
+
data.tar.gz: 93547fff043c799c6489041300733cb676f9daf1792df574181359178254cf8696295960740fb86e04a8f0cc09099037036e768dad581e185438fe434fec0018
|
data/.vscode/launch.json
CHANGED
@@ -8,8 +8,8 @@
|
|
8
8
|
"useBundler": true,
|
9
9
|
"cwd": "${workspaceRoot}/demo", // pod 命令执行的路径
|
10
10
|
"program": "/usr/local/bin/pod",
|
11
|
-
"args": ["update", "--verbose","--sources=http://gitlab.9tong.com/ios-group/HQPFoundation/hqpspecs.git"], // `pod` 命令的参数
|
12
|
-
|
11
|
+
// "args": ["update", "--verbose","--sources=http://gitlab.9tong.com/ios-group/HQPFoundation/hqpspecs.git"], // `pod` 命令的参数
|
12
|
+
"args": ["install", "--verbose"]
|
13
13
|
}
|
14
14
|
]
|
15
15
|
}
|
@@ -133,6 +133,8 @@ Pod::HooksManager.register('cocoapods-binaryhqp', :pre_install) do |installer_co
|
|
133
133
|
# install
|
134
134
|
lockfile = installer_context.lockfile
|
135
135
|
binary_installer = Pod::Installer.new(prebuild_sandbox, prebuild_podfile, lockfile)
|
136
|
+
|
137
|
+
binary_installer.delete_standard_sand_box_pod(standard_sandbox)
|
136
138
|
|
137
139
|
if binary_installer.have_exact_prebuild_cache? && !update
|
138
140
|
binary_installer.install_when_cache_hit!
|
@@ -33,7 +33,7 @@ module Pod
|
|
33
33
|
unchanged_pod_names.reverse_each do |name|
|
34
34
|
mainfest_pod_version = local_manifest.version(name).to_s
|
35
35
|
already_prebuild_version = prebuilded_framework_version(name) || "未找到"
|
36
|
-
if
|
36
|
+
if not compare_version(mainfest_pod_version, already_prebuild_version)
|
37
37
|
Pod::UI.puts("- #{name} 已编译版本 #{already_prebuild_version}, manifest中的版本: #{mainfest_pod_version}") if config.verbose
|
38
38
|
changed_pod_names = changed_pod_names.push(name)
|
39
39
|
unchanged_pod_names.delete(name)
|
@@ -42,12 +42,25 @@ module Pod
|
|
42
42
|
|
43
43
|
changes[:changed] = changed_pod_names
|
44
44
|
changes[:unchanged] = unchanged_pod_names
|
45
|
-
Pod::UI.puts("需要重编译的framework : #{changed_pod_names.to_s}") if config.verbose
|
45
|
+
Pod::UI.puts("Pre 需要重编译的framework : #{changed_pod_names.to_s}") if config.verbose
|
46
46
|
@prebuild_pods_changes = Analyzer::SpecsState.new(changes)
|
47
47
|
# save the chagnes info for later stage
|
48
48
|
Pod::Prebuild::Passer.prebuild_pods_changes = @prebuild_pods_changes
|
49
49
|
@prebuild_pods_changes
|
50
50
|
end
|
51
|
+
|
52
|
+
# compare version
|
53
|
+
# 1.2.0 == 1.2 => true
|
54
|
+
# 1.2.1 != 1.2.0 => false
|
55
|
+
def compare_version(first_version, second_version)
|
56
|
+
first_nums = first_version.split('.')
|
57
|
+
second_nums = second_version.split('.')
|
58
|
+
|
59
|
+
first_nums.pop until first_nums.last.to_i != 0
|
60
|
+
second_nums.pop until second_nums.last.to_i != 0
|
61
|
+
|
62
|
+
first_nums == second_nums
|
63
|
+
end
|
51
64
|
|
52
65
|
|
53
66
|
public
|
@@ -57,19 +70,35 @@ module Pod
|
|
57
70
|
changes = lockfile.detect_changes_with_podfile(podfile)
|
58
71
|
unchanged_pod_names = changes[:unchanged]
|
59
72
|
changed_pod_names = changes[:changed]
|
73
|
+
add_pod_names = changes[:added]
|
74
|
+
removed_pod_names = changes[:removed]
|
75
|
+
|
76
|
+
|
60
77
|
unchanged_pod_names.reverse_each do |name|
|
61
78
|
mainfest_pod_version = lockfile.version(name).to_s
|
62
79
|
already_prebuild_version = prebuilded_framework_version(name) || "未找到"
|
63
|
-
if
|
64
|
-
|
80
|
+
if compare_version(mainfest_pod_version, already_prebuild_version)
|
81
|
+
# 已经编译了
|
82
|
+
removed_pod_names.delete(name) if removed_pod_names.include?(name)
|
83
|
+
add_pod_names.delete(name) if add_pod_names.include?(name)
|
84
|
+
changed_pod_names.delete(name) if changed_pod_names.include?(name)
|
85
|
+
|
86
|
+
else
|
87
|
+
# 未找到相对应的版本
|
88
|
+
if already_prebuild_version == "99999.99999.99999"
|
89
|
+
Pod::UI.puts("- #{name}: 未找到预编译文件, manifest中的版本: #{mainfest_pod_version}") if config.verbose
|
90
|
+
else
|
91
|
+
Pod::UI.puts("- #{name}: 已编译版 #{already_prebuild_version}, manifest中的版本: #{mainfest_pod_version}") if config.verbose
|
92
|
+
end
|
65
93
|
changed_pod_names = changed_pod_names.push(name)
|
66
|
-
unchanged_pod_names.delete(name)
|
94
|
+
unchanged_pod_names.delete(name) if unchanged_pod_names.include?(name)
|
67
95
|
end
|
68
96
|
end
|
69
|
-
|
97
|
+
changes[:removed] = removed_pod_names
|
98
|
+
changes[:added] = add_pod_names
|
70
99
|
changes[:changed] = changed_pod_names
|
71
100
|
changes[:unchanged] = unchanged_pod_names
|
72
|
-
Pod::UI.puts("需要重编译的framework : #{changed_pod_names.
|
101
|
+
Pod::UI.puts("post 需要重编译的framework : #{(changed_pod_names + removed_pod_names + add_pod_names ).to_a}") if config.verbose
|
73
102
|
@prebuild_pods_changes = Analyzer::SpecsState.new(changes)
|
74
103
|
# save the chagnes info for later stage
|
75
104
|
Pod::Prebuild::Passer.prebuild_pods_changes = @prebuild_pods_changes
|
@@ -101,7 +130,7 @@ module Pod
|
|
101
130
|
# 当前已编译的framework的版本
|
102
131
|
def prebuilded_framework_version(name)
|
103
132
|
path = self.sandbox.plist_path_for_target_name(name)
|
104
|
-
framework_version = ""
|
133
|
+
framework_version = "99999.99999.99999"
|
105
134
|
if Pathname.new(path).exist?
|
106
135
|
plist_file = CFPropertyList::List.new(:file => path)
|
107
136
|
data = CFPropertyList.native_types(plist_file.value)
|
@@ -115,7 +144,20 @@ module Pod
|
|
115
144
|
def install_when_cache_hit!
|
116
145
|
# just print log
|
117
146
|
self.sandbox.exsited_framework_target_names.each do |name|
|
118
|
-
UI.puts "Using #{name}"
|
147
|
+
UI.puts "Using #{name}" if config.verbose
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
def delete_standard_sand_box_pod(standard_sanbox)
|
152
|
+
if lockfile
|
153
|
+
changes = lockfile.detect_changes_with_podfile(podfile)
|
154
|
+
need_update_pods = (changes[:added] + changes[:changed] + changes[:removed]).to_a
|
155
|
+
|
156
|
+
need_update_pods.each do |pod_name|
|
157
|
+
pod_path = Pathname.new(standard_sanbox.root.to_s + "/#{pod_name}")
|
158
|
+
Pod::UI.puts("删除 #{pod_path.to_s}")
|
159
|
+
pod_path.rmtree if pod_path.exist?
|
160
|
+
end
|
119
161
|
end
|
120
162
|
end
|
121
163
|
|
@@ -163,8 +205,8 @@ module Pod
|
|
163
205
|
end.flatten
|
164
206
|
|
165
207
|
# add the dendencies
|
166
|
-
dependency_targets = targets.map {|t| t.recursive_dependent_targets }.flatten.uniq || []
|
167
|
-
targets = (targets + dependency_targets).uniq
|
208
|
+
# dependency_targets = targets.map {|t| t.recursive_dependent_targets }.flatten.uniq || []
|
209
|
+
# targets = (targets + dependency_targets).uniq
|
168
210
|
else
|
169
211
|
targets = self.pod_targets
|
170
212
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-binaryhqp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leavez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|