cocoapods-tdf-bin 0.0.30 → 0.0.31
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: 52d79d7c48a4fa498edfe0d2a4676363072fbac3d1edcbef40a3885261213f60
|
4
|
+
data.tar.gz: 9f2481c7880b46e3474650aea259d97432d60abfba3cfdaf45af00c07f467d4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e472d730c0ec163ab3ab78c751f5c4ed68e4a401a32771a9e6444a2fc64028ab4e66ae2e4d230aacd0543c4d1dfcd8317466be1cd0b150814eeff2e0bf78d929
|
7
|
+
data.tar.gz: 426600ad46764c5d356a788bdff3ff89487eb146a5e45e0924e5608b6007c98e96a84f98311ddb016bc7d6d8447c0c0528077cda720f0701f2cc10fb644d408f
|
@@ -9,6 +9,11 @@ module Pod
|
|
9
9
|
|
10
10
|
self.summary = "批量操作本地依赖组件的 git 命令"
|
11
11
|
self.description = <<-DESC
|
12
|
+
批量导入的例子:
|
13
|
+
batch_pod [
|
14
|
+
"TDFHomeModule",
|
15
|
+
"TDFLogin",
|
16
|
+
], "../../", :branch => "feature/smallNeeds", :isLocal => true
|
12
17
|
用来批量操作通过 batch_pod_local 本地依赖的组件库,比如 pod bin batch pull, pod bin batch checkout master 等等;
|
13
18
|
操作的是是通过 batch_pod_local 依赖的本地组件
|
14
19
|
DESC
|
@@ -57,23 +62,35 @@ module Pod
|
|
57
62
|
local_pods = podfile_instance.get_batch_local_pods
|
58
63
|
local_pods.each_key do |name|
|
59
64
|
path = local_pods[name][0][:path]
|
65
|
+
branch = local_pods[name][0][:branch]
|
60
66
|
repo_url = Batch.find_repo_with_pod(name)
|
61
67
|
puts "============== #{name} 开始 clone 到 #{path}==============".tdf_blue
|
62
68
|
puts `git clone #{repo_url} #{path}`
|
69
|
+
res = `git -C #{path} checkout #{branch}`
|
70
|
+
puts "imwcl1"
|
71
|
+
puts res
|
72
|
+
if res != 0
|
73
|
+
puts "imwcl2"
|
74
|
+
`git -C #{path} checkout -b #{branch}`
|
75
|
+
end
|
63
76
|
end
|
64
77
|
end
|
65
78
|
|
66
79
|
def run_git(podfile_instance)
|
80
|
+
arg = @arguments.map do |v|
|
81
|
+
match_str = /\s/.match(v)
|
82
|
+
if nil != match_str
|
83
|
+
v = "\"#{v}\""
|
84
|
+
end
|
85
|
+
v
|
86
|
+
end
|
87
|
+
arg = arg.join(" ")
|
88
|
+
|
89
|
+
puts "============== 主工程开始执行 git #{arg} 命令 ==============".tdf_blue
|
90
|
+
puts `git #{arg}`
|
91
|
+
|
67
92
|
podfile_instance.get_batch_local_pods.each_value do |value|
|
68
93
|
path = value[0][:path]
|
69
|
-
arg = @arguments.map do |v|
|
70
|
-
match_str = /\s/.match(v)
|
71
|
-
if nil != match_str
|
72
|
-
v = "\"#{v}\""
|
73
|
-
end
|
74
|
-
v
|
75
|
-
end
|
76
|
-
arg = arg.join(" ")
|
77
94
|
puts "============== #{path} 开始执行 git #{arg} 命令 ==============".tdf_blue
|
78
95
|
puts `git -C #{path} #{arg}`
|
79
96
|
end
|
@@ -13,10 +13,26 @@ module Pod
|
|
13
13
|
set_internal_hash_value(ALLOW_PRERELEASE, true)
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
16
|
+
def batch_pod(pods, path = "../../", *requirements)
|
17
|
+
isLocal = requirements[0][:isLocal]
|
18
|
+
branch = requirements[0][:branch]
|
19
|
+
if isLocal.nil?
|
20
|
+
isLocal = false
|
21
|
+
end
|
22
|
+
if branch.nil?
|
23
|
+
branch = "master"
|
24
|
+
end
|
25
|
+
if isLocal
|
26
|
+
batch_pod_local(pods, path, branch)
|
27
|
+
else
|
28
|
+
batch_pod_remote(pods, branch)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def batch_pod_local(pods, path = "../../", branch = "master")
|
17
33
|
pod_hash = Hash.new
|
18
34
|
pods.each do |name|
|
19
|
-
pod_hash[name] = [ :path => "#{path}#{name}" ]
|
35
|
+
pod_hash[name] = [ :path => "#{path}#{name}", :branch => branch ]
|
20
36
|
end
|
21
37
|
if get_batch_local_pods.nil?
|
22
38
|
set_internal_hash_value(BATCH_POD_LOCAL, pod_hash)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-tdf-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gaijiaofan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|