lg_pod_plugin 1.1.5.4 → 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 +4 -4
- data/lib/command/install.rb +13 -3
- data/lib/command/update.rb +13 -3
- data/lib/lg_pod_plugin/git/github_archive.rb +0 -42
- data/lib/lg_pod_plugin/installer/PodDownload +0 -0
- data/lib/lg_pod_plugin/installer/main.rb +2 -1
- data/lib/lg_pod_plugin/pod/release-pod.rb +17 -22
- data/lib/lg_pod_plugin/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1a582e75b0b0847e488e68ee221be42aca9fe30556d85a9e280ff8e46a0a729
|
4
|
+
data.tar.gz: bfab01e6cc1f088c88c571157f8b42376b821e709725bff99f0d47cb62697a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4049ace3059b7139348e5c36e700fdc52f5d7bb33f768cc45092ae618c99bcef44747de19bcfc41b204f01d5c10587d9453d724b500b5715165509d8e59df61f
|
7
|
+
data.tar.gz: 1941ad03e70d5a9d5e4bbb7496ac3b4df5f2ee037c10dd9fee6209bed74d7900163b9bacac8041572c740ba4fabc8617997862f58c5c1f5d18a3c9187fa84dda
|
data/lib/command/install.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/command/update.rb
CHANGED
@@ -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
|
-
|
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 }]
|
Binary file
|
@@ -31,7 +31,8 @@ module LgPodPlugin
|
|
31
31
|
self.install_external_pod(project)
|
32
32
|
# # 安装开发版本pod
|
33
33
|
verbose = options[:verbose] ||= false
|
34
|
-
|
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)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'cocoapods'
|
2
2
|
require 'cocoapods-core'
|
3
|
+
require 'cocoapods/user_interface'
|
3
4
|
require_relative '../config/podspec'
|
4
5
|
require_relative '../installer/concurrency'
|
5
6
|
|
@@ -84,30 +85,24 @@ module LgPodPlugin
|
|
84
85
|
else
|
85
86
|
installer.integrate
|
86
87
|
end
|
87
|
-
|
88
|
+
self.write_lockfiles(installer)
|
88
89
|
installer.send(:perform_post_install_actions)
|
89
|
-
write_podfile_lock
|
90
|
-
write_manifest_lock
|
91
90
|
end
|
92
91
|
|
93
|
-
def self.
|
94
|
-
|
95
|
-
lockfile =
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
lockfile.send(:write_to_disk, lockfile_path)
|
101
|
-
end
|
92
|
+
def self.write_lockfiles(installer)
|
93
|
+
config = Pod::Config.instance
|
94
|
+
lockfile = installer.send(:generate_lockfile)
|
95
|
+
Pod::UI.message "- Writing Lockfile in #{Pod::UI.path config.lockfile_path}" do hash = lockfile.send(:internal_data)
|
96
|
+
hash["LOCKFILE TYPE"] = "LgPodPlugin"
|
97
|
+
lockfile.write_to_disk(config.lockfile_path)
|
98
|
+
end
|
102
99
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
lockfile_path = lockfile.send(:defined_in_file)
|
110
|
-
lockfile.send(:write_to_disk, lockfile_path)
|
100
|
+
sandbox = installer.send(:sandbox)
|
101
|
+
Pod::UI.message "- Writing Manifest in #{Pod::UI.path sandbox.manifest_path}" do
|
102
|
+
hash = lockfile.send(:internal_data)
|
103
|
+
hash["LOCKFILE TYPE"] = "LgPodPlugin"
|
104
|
+
lockfile.write_to_disk(sandbox.manifest_path)
|
105
|
+
end
|
111
106
|
end
|
112
107
|
|
113
108
|
def self.lockfile_missing_pods(pods, lockfile)
|
@@ -138,7 +133,7 @@ module LgPodPlugin
|
|
138
133
|
end
|
139
134
|
end
|
140
135
|
|
141
|
-
def self.install_release_pod(update, repo_update, verbose)
|
136
|
+
def self.install_release_pod(update, repo_update, verbose, clean_install)
|
142
137
|
#切换工作目录到当前工程下, 开始执行pod install
|
143
138
|
workspace = LProject.shared.workspace
|
144
139
|
FileUtils.chdir(workspace)
|
@@ -175,7 +170,7 @@ module LgPodPlugin
|
|
175
170
|
installer.update = false
|
176
171
|
end
|
177
172
|
installer.deployment = false
|
178
|
-
installer.clean_install =
|
173
|
+
installer.clean_install = clean_install
|
179
174
|
installer.prepare
|
180
175
|
resolve_dependencies(lockfile, installer)
|
181
176
|
dependencies(installer)
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lg_pod_plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.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-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: json
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 2.6.1
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - '='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 2.6.1
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: cocoapods
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|