cocoapods-cafswitcher 0.0.7 → 0.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: febf0dcfc7d5b512809d9192fa32ee0965419bf77ea2510593c5ded9e6295232
|
4
|
+
data.tar.gz: 3b55ab2f6515af3c57b528c6826c510b5e970b7ca28ba1ef7bab9d976fc53874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0b70ab908288f28f0cef34cacb9b63e90127c6ab71b8840c182184f623590ba5f10b0e5faf85c98008691613906d73c0172782777c7899f8d1f7a046558ab8f
|
7
|
+
data.tar.gz: d7460548c7926c850427abcafb5607efb21e76d2a551eed2534b57e80795b038f67d283c464ddac6bf85a7bbabf72d2b8495dd8f70bae7d7853fd02c256766a8
|
data/Gemfile.lock
CHANGED
@@ -162,24 +162,31 @@ Pod::HooksManager.register('cocoapods-cafswitcher', :pre_install) do |installer_
|
|
162
162
|
Pod::UI.puts "\nchanged sub Pod is:\n " + changedSubPods.to_s if changedSubPods.length > 0
|
163
163
|
# changedPod 里是根据subspec来存的,需要进行合并,找到pod库而不是含有subspec的库
|
164
164
|
changedPods = Array.new
|
165
|
-
changedSubPods.each
|
165
|
+
changedSubPods.each do |subPod|
|
166
|
+
subPod.chomp!("_SOURCE")
|
167
|
+
subPod.chomp!("_ARCHIVE")
|
168
|
+
subPod.chomp!("_FRAMEWORK")
|
169
|
+
changedPods << subPod
|
170
|
+
end
|
166
171
|
# changedPods = changedPods | needUpdatePodList
|
167
172
|
changedPods.uniq!
|
168
173
|
|
169
174
|
Pod::UI.puts "\nchanged Pod is:\n " + changedPods.to_s if changedPods.length > 0
|
170
|
-
|
175
|
+
|
171
176
|
# 根据不同删除cache
|
172
177
|
podRoot = config.project_pods_root
|
173
178
|
changedPods.each do |changedPod|
|
174
179
|
if needUpdatePodList.delete(changedPod)
|
175
|
-
|
180
|
+
Pod::UI.puts "正在清理#{changedPod}的缓存"
|
176
181
|
cacheCleanCMD = "pod cache clean #{changedPod} --all"
|
177
182
|
out = `#{cacheCleanCMD}`.lines.to_a
|
178
|
-
puts out
|
183
|
+
Pod::UI.puts out
|
184
|
+
end
|
185
|
+
if changedPod =~ /^(?i)LJ/ or changedPod =~ /^(?i)Lianjia/
|
186
|
+
# 清除目录 pods 文件夹下的缓存
|
187
|
+
changedPodPath = podRoot + changedPod
|
188
|
+
FileUtils.rm_r(changedPodPath) if changedPodPath.exist?
|
179
189
|
end
|
180
|
-
# 清除目录 pods 文件夹下的缓存
|
181
|
-
changedPodPath = podRoot + changedPod
|
182
|
-
FileUtils.rm_r(changedPodPath) if changedPodPath.exist?
|
183
190
|
end
|
184
191
|
|
185
192
|
# 把新的配置写入file
|
@@ -182,11 +182,7 @@ module Pod
|
|
182
182
|
isPath = options.has_key?(:path)
|
183
183
|
# pod_name = Specification.root_name(name)
|
184
184
|
if isPath
|
185
|
-
|
186
|
-
if not index
|
187
|
-
index = name.length
|
188
|
-
end
|
189
|
-
Pod::Podfile.needUpdatePodList << name[0,index]
|
185
|
+
Pod::Podfile.needUpdatePodList << name[0,name=~/[\/]/]
|
190
186
|
end
|
191
187
|
requirements.pop if options.empty?
|
192
188
|
end
|