cocoapods-hooks 0.0.4 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72c23779b6eff3a8108ac8b7260aafb259917ff3e0718600d639fa52b88f4c59
|
4
|
+
data.tar.gz: 66d30fbe478bf8eb55207415cd62202e34fbdb56083fd9de6888ea548edbbcfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f53d3695229587fda198d2c04e7a0d588ca810c8318a05115d7883053b4e5eee5f6caaa924b4517c11363d1219f7e590bf432d407784c6c22ac35c2ee77b99
|
7
|
+
data.tar.gz: 12f1006e56c4ba1ccb697d5aef1759ebcc107b5fee1983341ff39ea7d655511949a423c454f48dbc72abfdf04af98ea361c739cd1d55451d5ce206c876aacbc1
|
@@ -8,34 +8,38 @@ module Pod
|
|
8
8
|
def self.options
|
9
9
|
[
|
10
10
|
['--tenantid=TENANTID', 'Specify the tenant ID'],
|
11
|
-
['--
|
11
|
+
['--version=Version', 'Specify the sdk version for git clone']
|
12
12
|
].concat(super)
|
13
13
|
end
|
14
14
|
|
15
15
|
def initialize(argv)
|
16
16
|
@tenantid = argv.option('tenantid')
|
17
|
-
|
18
|
-
@branch = argv.option('branch')
|
17
|
+
@version = argv.option('version')
|
19
18
|
super
|
20
19
|
end
|
21
20
|
|
22
21
|
def validate!
|
23
22
|
super
|
24
23
|
help! 'A tenant ID is required.' unless @tenantid
|
24
|
+
help! 'A sdk version is required.' unless @version
|
25
25
|
end
|
26
26
|
|
27
27
|
def run
|
28
28
|
UI.puts "Downloading OEM configuration for tenant #{@tenantid}"
|
29
|
+
if @tenantid.nil? || @tenantid.empty?
|
30
|
+
UI.puts "没有传入 tenantid, 直接退出程序"
|
31
|
+
exit 1
|
32
|
+
end
|
29
33
|
# 执行你的业务逻辑
|
30
|
-
if @
|
31
|
-
UI.puts "
|
32
|
-
|
34
|
+
if @version.nil? || @version.empty?
|
35
|
+
UI.puts "没有传入指定版本,直接退出程序"
|
36
|
+
exit 1
|
33
37
|
end
|
34
|
-
self.class.git_clone_project_config(@tenantid, @
|
38
|
+
self.class.git_clone_project_config(@tenantid, @version)
|
35
39
|
end
|
36
40
|
|
37
41
|
private
|
38
|
-
def self.git_clone_project_config(tenant_id,
|
42
|
+
def self.git_clone_project_config(tenant_id, version)
|
39
43
|
puts "start download ios project config with tenantid: #{tenant_id}"
|
40
44
|
# 先尝试删除源目录
|
41
45
|
if Dir.exist?('ios_project_config')
|
@@ -43,7 +47,7 @@ module Pod
|
|
43
47
|
FileUtils.rm_r('ios_project_config')
|
44
48
|
end
|
45
49
|
ios_project_config_git_url = 'ssh://git@192.168.31.7:7999/ios_module/ios_project_config.git'
|
46
|
-
success = system("git clone -b #{
|
50
|
+
success = system("git clone -b #{version} #{ios_project_config_git_url}")
|
47
51
|
puts "当前命令的路径为:#{Dir.pwd}"
|
48
52
|
if success
|
49
53
|
puts "repository cloned to #{Dir.pwd}"
|
@@ -11,45 +11,51 @@ module Pod
|
|
11
11
|
def self.options
|
12
12
|
[
|
13
13
|
['--tenantid=TENANTID', 'Specify the tenant ID'],
|
14
|
-
['--
|
14
|
+
['--version=Version', 'Specify the sdk version for git clone']
|
15
15
|
].concat(super)
|
16
16
|
end
|
17
17
|
|
18
18
|
def initialize(argv)
|
19
19
|
@tenantid = argv.option('tenantid')
|
20
|
-
@
|
20
|
+
@version = argv.option('version')
|
21
21
|
super
|
22
22
|
end
|
23
23
|
|
24
24
|
def validate!
|
25
25
|
super
|
26
26
|
help! 'A tenant ID is required.' unless @tenantid
|
27
|
+
help! 'A sdk version is required.' unless @version
|
27
28
|
end
|
28
29
|
|
29
30
|
def run
|
30
31
|
UI.puts "Downloading OEM configuration for tenant #{@tenantid}"
|
31
32
|
# 执行你的业务逻辑
|
32
|
-
if @
|
33
|
-
UI.puts "
|
34
|
-
|
33
|
+
if @tenantid.nil? || @tenantid.empty?
|
34
|
+
UI.puts "没有传入 tenantid, 直接退出程序"
|
35
|
+
exit 1
|
36
|
+
end
|
37
|
+
# 执行你的业务逻辑
|
38
|
+
if @version.nil? || @version.empty?
|
39
|
+
UI.puts "没有传入指定版本,直接退出程序"
|
40
|
+
exit 1
|
35
41
|
end
|
36
42
|
# 1. 根据 tenant_id 下载相关的配置文件
|
37
|
-
result = system("pod git-clone --tenantid=#{@tenantid} --
|
43
|
+
result = system("pod git-clone --tenantid=#{@tenantid} --version=#{@version}")
|
38
44
|
unless result
|
39
45
|
puts "pod git-clone command execution failed. Exiting..."
|
40
|
-
|
46
|
+
exit 1
|
41
47
|
end
|
42
48
|
# 2. 修改图片的主题色
|
43
49
|
result = system("pod change-color")
|
44
50
|
unless result
|
45
51
|
puts "pod change-color command execution failed. Exiting..."
|
46
|
-
|
52
|
+
exit 1
|
47
53
|
end
|
48
54
|
# 3. 修改工程配置, 进行签名
|
49
55
|
result = system("pod fastlane-sign")
|
50
56
|
unless result
|
51
57
|
puts "pod fastlane-sign command execution failed. Exiting..."
|
52
|
-
|
58
|
+
exit 1
|
53
59
|
end
|
54
60
|
end
|
55
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-hooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- huafeng
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|