lg_pod_plugin 1.1.5.6 → 1.1.5.7

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: f1a582e75b0b0847e488e68ee221be42aca9fe30556d85a9e280ff8e46a0a729
4
- data.tar.gz: bfab01e6cc1f088c88c571157f8b42376b821e709725bff99f0d47cb62697a6e
3
+ metadata.gz: ce8fcf508c4622d896bc35d848db7c9d8238648722e38cde3dca35f5b30a5c42
4
+ data.tar.gz: 756567c34b08dc9d99af1f8f9c4fd8a3adf527d60afd4155315ed4c2e7a89616
5
5
  SHA512:
6
- metadata.gz: 4049ace3059b7139348e5c36e700fdc52f5d7bb33f768cc45092ae618c99bcef44747de19bcfc41b204f01d5c10587d9453d724b500b5715165509d8e59df61f
7
- data.tar.gz: 1941ad03e70d5a9d5e4bbb7496ac3b4df5f2ee037c10dd9fee6209bed74d7900163b9bacac8041572c740ba4fabc8617997862f58c5c1f5d18a3c9187fa84dda
6
+ metadata.gz: 0e35116e0824a397cfb7021ed6ffa793d1143f3300b8eab09c827a93e704292ed13b38bab506b8754ad3379d7fc682c34d537516545c2c4e9c89581158f399e3
7
+ data.tar.gz: defe217180c036512d189a183d7ad1ce1a20a6b90bbdc56ef957851c55d6bcfee279fbfeb5ce64ac8a762fda002b76c5601ae4f57ad6449e21cfe3984e304c9f
@@ -50,11 +50,7 @@ module LgPodPlugin
50
50
  end
51
51
  hash_map = self.request.get_cache_key_params
52
52
  # 发现本地有缓存, 不需要更新缓存
53
- if self.request.single_git
54
- pod_is_exist, destination, cache_pod_spec = LCache.new.pod_cache_exist(name, hash_map, podspec, self.request.released_pod)
55
- else
56
- pod_is_exist, destination, cache_pod_spec = LCache.new.pod_cache_exist(name, hash_map, podspec, self.request.released_pod)
57
- end
53
+ pod_is_exist, destination, cache_pod_spec = LCache.new.pod_cache_exist(name, hash_map, podspec, self.request.released_pod)
58
54
  if pod_is_exist
59
55
  is_delete = self.request.params["is_delete"] ||= false
60
56
  LProject.shared.need_update_pods.delete(name) if is_delete
@@ -102,7 +98,6 @@ module LgPodPlugin
102
98
  download_params.delete("podspec_content")
103
99
  end
104
100
  end
105
- FileUtils.rm_rf podspec_path
106
101
  end
107
102
  return download_params
108
103
  elsif File.exist?(download_params.to_s) && download_params
@@ -14,8 +14,8 @@ module LgPodPlugin
14
14
  public
15
15
  def pod_cache_exist(name, options, spec = nil, released_pod = false)
16
16
  destination, cache_pod_spec = self.find_pod_cache name, options, spec, released_pod
17
- if (File.exist?(destination) && !destination.children.empty?)
18
- [true, destination, cache_pod_spec]
17
+ if (File.exist?(destination) && !destination.children.empty?) && cache_pod_spec.exist?
18
+ return [true, destination, cache_pod_spec]
19
19
  else
20
20
  [false, destination, cache_pod_spec]
21
21
  end
@@ -68,17 +68,17 @@ module LgPodPlugin
68
68
  end
69
69
  pod_spec_file_path = sandbox_path.join("#{podspec_filename}")
70
70
  lg_spec = LgPodPlugin::PodSpec.form_string(podspec_content, pod_spec_file_path)
71
- unless lg_spec
72
- if podspec_content
73
- begin
74
- File.open(pod_spec_file_path, "w+") do |f|
75
- f.write podspec_content
76
- end
77
- rescue => exception
78
- LgPodPlugin.log_red "#{exception}"
71
+ if podspec_content
72
+ begin
73
+ File.open(pod_spec_file_path, "w+") do |f|
74
+ f.write podspec_content
79
75
  end
80
- @podspec_content = podspec_content
76
+ rescue => exception
77
+ LgPodPlugin.log_red "#{exception}"
81
78
  end
79
+ @podspec_content = podspec_content
80
+ end
81
+ unless lg_spec
82
82
  download_url = host + "/api/v4/projects/" + "#{project.id}" + "/repository/archive.tar.bz2\\?" + "sha\\=#{sha}"
83
83
  download_url += "\\&access_token\\=#{token}" if token
84
84
  return [{ "filename" => "#{self.name}.tar.bz2", "url" => download_url }]
@@ -37,29 +37,13 @@ module LgPodPlugin
37
37
  if request.lg_spec
38
38
  cache_podspec = request.lg_spec.spec
39
39
  else
40
- cache_podspec = nil
41
- end
42
-
43
- unless cache_podspec
44
40
  cache_podspec = LProject.shared.cache_specs[name]
45
41
  request.lg_spec = LgPodPlugin::PodSpec.form_pod_spec cache_podspec if cache_podspec
46
42
  end
47
-
48
- if cache_podspec
49
- destination = self.download_params["destination"]
50
- if destination && File.exist?(destination) && !Pathname(destination).children.empty?
51
- pod_is_exist = true
52
- else
53
- pod_is_exist = false
54
- end
55
- else
56
- destination = self.download_params["destination"]
57
- if destination && File.exist?(destination) && !Pathname(destination).children.empty?
58
- pod_is_exist = true
59
- else
60
- pod_is_exist = false
61
- end
62
- cache_pod_spec_path = self.download_params["cache_pod_spec_path"]
43
+ destination = self.download_params["destination"]
44
+ cache_pod_spec_path = self.download_params["cache_pod_spec_path"]
45
+ # podspec.json 不存在
46
+ unless cache_podspec
63
47
  local_spec_path = destination.glob("#{name}.podspec{,.json}").last
64
48
  if local_spec_path && File.exist?(local_spec_path)
65
49
  cache_podspec = Pod::Specification.from_file local_spec_path
@@ -71,6 +55,12 @@ module LgPodPlugin
71
55
  end
72
56
  request.lg_spec = LgPodPlugin::PodSpec.form_pod_spec cache_podspec if cache_podspec
73
57
  end
58
+ # 判断缓存是否下载成功
59
+ if (destination && File.exist?(destination) && !Pathname(destination).children.empty?) && (cache_pod_spec_path && File.exist?(cache_pod_spec_path))
60
+ pod_is_exist = true
61
+ else
62
+ pod_is_exist = false
63
+ end
74
64
  if pod_is_exist
75
65
  is_delete = request.params["is_delete"] ||= false
76
66
  LProject.shared.need_update_pods.delete(name) if is_delete
@@ -1,3 +1,3 @@
1
1
  module LgPodPlugin
2
- VERSION = "1.1.5.6"
2
+ VERSION = "1.1.5.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lg_pod_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5.6
4
+ version: 1.1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - dongzb01
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-02 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods