lg_pod_plugin 1.1.5.5 → 1.1.5.6

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: 3aac9e3f7ae1ac1bec1f38f9faf0484bf7f79cd4f7cd70030203ac802b0c892e
4
- data.tar.gz: 9c22ae4997c0bf795021a4bb1ab905786af8c585622398560fe8e97a5ca4ed27
3
+ metadata.gz: f1a582e75b0b0847e488e68ee221be42aca9fe30556d85a9e280ff8e46a0a729
4
+ data.tar.gz: bfab01e6cc1f088c88c571157f8b42376b821e709725bff99f0d47cb62697a6e
5
5
  SHA512:
6
- metadata.gz: caf7d0bd717856e93ab3c3f699c44879e69ae29762864c5d9d1a174b5e09ae800a87e8d3951bd23f071125e11232129449616a1ec971c26ba132ccaf956ce402
7
- data.tar.gz: 81b84ca084996f062d6e33c26cc09001cb2cbacb50fea6c81fe8fb4b793be3e69fadf4f27387b1223d0d5e6ae6bc6e74d3dac160144d733597cc0598106b3ef9
6
+ metadata.gz: 4049ace3059b7139348e5c36e700fdc52f5d7bb33f768cc45092ae618c99bcef44747de19bcfc41b204f01d5c10587d9453d724b500b5715165509d8e59df61f
7
+ data.tar.gz: 1941ad03e70d5a9d5e4bbb7496ac3b4df5f2ee037c10dd9fee6209bed74d7900163b9bacac8041572c740ba4fabc8617997862f58c5c1f5d18a3c9187fa84dda
@@ -3,7 +3,7 @@ require 'claide'
3
3
  module LgPodPlugin
4
4
  class Command
5
5
  class Install < Command
6
- REQUIRED_ATTRS ||= %i[log repo_update].freeze
6
+ REQUIRED_ATTRS ||= %i[log repo_update clean_install].freeze
7
7
  attr_accessor(*REQUIRED_ATTRS)
8
8
 
9
9
  self.summary = 'Install project dependencies according to versions from a Podfile.lock'
@@ -40,14 +40,24 @@ module LgPodPlugin
40
40
 
41
41
  def initialize(argv)
42
42
  self.log = argv.flag?('verbose')
43
- self.repo_update = argv.flag?('repo-update')
43
+ repo_flag = argv.flag?('repo-update')
44
+ if repo_flag.nil?
45
+ self.repo_update = true
46
+ else
47
+ self.repo_update = repo_flag
48
+ end
49
+ if argv.flag?('clean-install').nil?
50
+ @clean_install = false
51
+ else
52
+ @clean_install = true
53
+ end
44
54
  super
45
55
  end
46
56
 
47
57
  def run
48
58
 
49
59
  begin_time = Time.now.to_i
50
- LgPodPlugin::Main.run("install", { :verbose => self.log, :repo_update => self.repo_update })
60
+ LgPodPlugin::Main.run("install", { :verbose => self.log, :repo_update => self.repo_update, :clean_install => self.clean_install })
51
61
  end_time = Time.now.to_i
52
62
  LgPodPlugin.log_blue "`lg install`安装所需时间: #{end_time - begin_time}"
53
63
  end
@@ -2,7 +2,7 @@ require 'claide'
2
2
  module LgPodPlugin
3
3
  class Command
4
4
  class Update < Command
5
- REQUIRED_ATTRS ||= %i[log repo_update].freeze
5
+ REQUIRED_ATTRS ||= %i[log repo_update clean_install].freeze
6
6
  attr_accessor(*REQUIRED_ATTRS)
7
7
  self.summary = 'Update outdated project dependencies and create new ' \
8
8
  'Podfile.lock'
@@ -27,13 +27,23 @@ module LgPodPlugin
27
27
 
28
28
  def initialize(argv)
29
29
  self.log = argv.flag?('verbose')
30
- self.repo_update = argv.flag?('repo-update')
30
+ repo_flag = argv.flag?('repo-update')
31
+ if repo_flag.nil?
32
+ self.repo_update = true
33
+ else
34
+ self.repo_update = repo_flag
35
+ end
36
+ if argv.flag?('clean-install').nil?
37
+ @clean_install = false
38
+ else
39
+ @clean_install = true
40
+ end
31
41
  super
32
42
  end
33
43
 
34
44
  def run
35
45
  begin_time = Time.now.to_i
36
- LgPodPlugin::Main.run("update", { :verbose => self.log, :repo_update => self.repo_update})
46
+ LgPodPlugin::Main.run("update", { :verbose => self.log, :repo_update => self.repo_update, :clean_install => self.clean_install })
37
47
  end_time = Time.now.to_i
38
48
  LgPodPlugin.log_blue "`lg update`安装所需时间: #{end_time - begin_time}"
39
49
  end
@@ -37,11 +37,6 @@ module LgPodPlugin
37
37
  def github_download_tag_zip(root_path)
38
38
  project_name = LUtils.get_git_project_name self.git
39
39
  download_urls = self.download_archive_zip(project_name)
40
- # unless self.spec
41
- # podspec_filename = self.name + ".podspec"
42
- # podspec_content = GithubAPI.get_podspec_file_content self.git, self.commit, podspec_filename
43
- # self.spec = LgPodPlugin::PodSpec.form_string(podspec_content, root_path + "/#{podspec_filename}") if podspec_content
44
- # end
45
40
  download_params = Hash.new
46
41
  download_params["name"] = self.name
47
42
  download_params["type"] = "github-tag"
@@ -54,7 +49,6 @@ module LgPodPlugin
54
49
  else
55
50
  download_params["podspec"] = nil
56
51
  download_params["source_files"] = ["All"]
57
- # download_params["podspec_content"] = podspec_content if podspec_content
58
52
  end
59
53
  download_params
60
54
  end
@@ -62,11 +56,6 @@ module LgPodPlugin
62
56
  def github_download_branch_zip(root_path)
63
57
  project_name = LUtils.get_git_project_name self.git
64
58
  download_urls = self.download_archive_zip(project_name)
65
- # unless self.spec
66
- # podspec_filename = self.name + ".podspec"
67
- # podspec_content = GithubAPI.get_podspec_file_content self.git, self.commit, podspec_filename
68
- # self.spec = LgPodPlugin::PodSpec.form_string(podspec_content, root_path + "/#{podspec_filename}") if podspec_content
69
- # end
70
59
  download_params = Hash.new
71
60
  download_params["name"] = self.name
72
61
  download_params["type"] = "github-branch"
@@ -78,7 +67,6 @@ module LgPodPlugin
78
67
  else
79
68
  download_params["podspec"] = nil
80
69
  download_params["source_files"] = ["All"]
81
- # download_params["podspec_content"] = podspec_content if podspec_content
82
70
  end
83
71
  download_params
84
72
  end
@@ -86,11 +74,6 @@ module LgPodPlugin
86
74
  def github_download_commit_zip(root_path)
87
75
  project_name = LUtils.get_git_project_name self.git
88
76
  download_urls = self.download_archive_zip(project_name)
89
- # unless self.spec
90
- # podspec_filename = self.name + ".podspec"
91
- # podspec_content = GithubAPI.get_podspec_file_content self.git, self.commit, podspec_filename
92
- # self.spec = LgPodPlugin::PodSpec.form_string(podspec_content, root_path + "/#{podspec_filename}") if podspec_content
93
- # end
94
77
  download_params = Hash.new
95
78
  download_params["name"] = self.name
96
79
  download_params["type"] = "github-commit"
@@ -102,7 +85,6 @@ module LgPodPlugin
102
85
  else
103
86
  download_params["podspec"] = nil
104
87
  download_params["source_files"] = ["All"]
105
- # download_params["podspec_content"] = podspec_content if podspec_content
106
88
  end
107
89
  download_params
108
90
  end
@@ -118,27 +100,9 @@ module LgPodPlugin
118
100
  repo_name = nil
119
101
  end
120
102
  return nil unless repo_name
121
- # network_ok = false
122
- # result = %x(ping gh.api.99988866.xyz -t 1)
123
- # if !result || result == "" || result.include?("timeout")
124
- # network_ok = false
125
- # else
126
- # network_ok = true
127
- # end
128
103
  if self.git && self.tag
129
104
  download_url = "https://codeload.github.com/#{repo_name}/tar.gz/refs/tags/#{self.tag}"
130
105
  [{ "filename" => "#{project_name}.tar.gz", "url" => download_url }]
131
- # if network_ok
132
- # repo_info = GithubAPI.get_repo_info(repo_name)
133
- # html_url = repo_info["html_url"]
134
- # if html_url
135
- # base_url = html_url
136
- # end
137
- # download_url = "https://gh.api.99988866.xyz/#{base_url}/archive/refs/tags/#{self.tag}.tar.gz"
138
- # [{ "filename" => "#{project_name}.tar.gz", "url" => download_url }]
139
- # else
140
- #
141
- # end
142
106
  elsif self.git && self.branch
143
107
  if self.branch == "HEAD"
144
108
  download_url = "https://gh.api.99988866.xyz/" + "#{base_url}" + "/archive/#{self.branch}.tar.gz"
@@ -147,12 +111,6 @@ module LgPodPlugin
147
111
  download_url = "https://codeload.github.com/#{repo_name}/tar.gz/refs/heads/#{self.branch}"
148
112
  [{ "filename" => "#{project_name}.tar.gz", "url" => download_url }]
149
113
  end
150
- # if network_ok
151
- # download_url = "https://gh.api.99988866.xyz/#{base_url}/archive/#{self.branch}.tar.gz"
152
- # [{ "filename" => "#{project_name}.tar.gz", "url" => download_url }]
153
- # else
154
- #
155
- # end
156
114
  elsif self.git && self.commit
157
115
  download_url = "https://codeload.github.com/#{repo_name}/tar.gz/#{self.commit}"
158
116
  return [{ "filename" => "#{project_name}.tar.gz", "url" => download_url }]
@@ -31,7 +31,8 @@ module LgPodPlugin
31
31
  self.install_external_pod(project)
32
32
  # # 安装开发版本pod
33
33
  verbose = options[:verbose] ||= false
34
- ReleasePod.install_release_pod(update, repo_update, verbose)
34
+ clean_install = options[:clean_install] ||= false
35
+ ReleasePod.install_release_pod(update, repo_update, verbose, clean_install)
35
36
  end
36
37
 
37
38
  def self.install_external_pod(project)
@@ -133,7 +133,7 @@ module LgPodPlugin
133
133
  end
134
134
  end
135
135
 
136
- def self.install_release_pod(update, repo_update, verbose)
136
+ def self.install_release_pod(update, repo_update, verbose, clean_install)
137
137
  #切换工作目录到当前工程下, 开始执行pod install
138
138
  workspace = LProject.shared.workspace
139
139
  FileUtils.chdir(workspace)
@@ -170,7 +170,7 @@ module LgPodPlugin
170
170
  installer.update = false
171
171
  end
172
172
  installer.deployment = false
173
- installer.clean_install = false
173
+ installer.clean_install = clean_install
174
174
  installer.prepare
175
175
  resolve_dependencies(lockfile, installer)
176
176
  dependencies(installer)
@@ -1,3 +1,3 @@
1
1
  module LgPodPlugin
2
- VERSION = "1.1.5.5"
2
+ VERSION = "1.1.5.6"
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.5
4
+ version: 1.1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - dongzb01
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-05 00:00:00.000000000 Z
11
+ date: 2023-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods