cocoapods-tdf-bin 0.0.20 → 0.0.24
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: b12ad3159d7e92f44ffd550df9bf4d09646c07769d9feea345778edf575ccb8c
|
4
|
+
data.tar.gz: cc4bee203d36048b9ca59b9e83f10cf5ba2e1bc77458ebd9a4399b046984bcfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21663273f73583007da2afb7c44fdfbe7dd287b4e402f3ec9887b89affbe7b4646fc8674a3cabd302534e93678b2b6822e98d4ca50a6f952b2a98378bb481d3f
|
7
|
+
data.tar.gz: 90212296c1ecde617fe82904aee89e295770f02467678a3fa8f2eb8076e22fc6b6da71c3268074c9178f1a2525f830a7cad8a4a4be1dd18bbf8119970357114e
|
@@ -56,7 +56,7 @@ module Pod
|
|
56
56
|
local_pods.each_key do |name|
|
57
57
|
path = local_pods[name][0][:path]
|
58
58
|
repo_url = find_repo_with_pod(name)
|
59
|
-
puts "============== #{name} 开始 clone 到 #{path}==============".
|
59
|
+
puts "============== #{name} 开始 clone 到 #{path}==============".tdf_blue
|
60
60
|
puts `git clone #{repo_url} #{path}`
|
61
61
|
end
|
62
62
|
end
|
@@ -64,8 +64,15 @@ module Pod
|
|
64
64
|
def run_git(podfile_instance)
|
65
65
|
podfile_instance.get_batch_local_pods.each_value do |value|
|
66
66
|
path = value[0][:path]
|
67
|
-
arg = @arguments.
|
68
|
-
|
67
|
+
arg = @arguments.map do |v|
|
68
|
+
match_str = /\s/.match(v)
|
69
|
+
if nil != match_str
|
70
|
+
v = "\"#{v}\""
|
71
|
+
end
|
72
|
+
v
|
73
|
+
end
|
74
|
+
arg = arg.join(" ")
|
75
|
+
puts "============== #{path} 开始执行 git #{arg} 命令 ==============".tdf_blue
|
69
76
|
puts `git -C #{path} #{arg}`
|
70
77
|
end
|
71
78
|
end
|
@@ -79,7 +86,7 @@ module Pod
|
|
79
86
|
git_url = `git -C #{path} remote get-url --push origin`
|
80
87
|
current_branch = `git -C #{path} branch --show-current`.delete!("\n")
|
81
88
|
group_name = get_group_with_repo(git_url)
|
82
|
-
puts "============== #{name} 当前分支 #{current_branch} 当前组 #{group_name} ==============".
|
89
|
+
puts "============== #{name} 当前分支 #{current_branch} 当前组 #{group_name} ==============".tdf_blue
|
83
90
|
|
84
91
|
group_key = "#{group_name}&&#{current_branch}"
|
85
92
|
repo_arr = group_map[group_key]
|
@@ -101,17 +108,29 @@ module Pod
|
|
101
108
|
end
|
102
109
|
group = key.split("&&")[0]
|
103
110
|
branch = key.split("&&")[1]
|
104
|
-
pod_remote_str << " ], \"#{branch}\", \"#{group}\"\n\n"
|
111
|
+
pod_remote_str << " ], \"#{branch}\", \"#{group}\" \n\n"
|
105
112
|
end
|
106
|
-
puts "将 local_batch 依赖 替换为 \n#{pod_remote_str}".
|
113
|
+
puts "将 local_batch 依赖 替换为 \n#{pod_remote_str}".tdf_blue
|
107
114
|
|
108
115
|
# 替换 podfile 中的local batch
|
116
|
+
re = / *batch_pod_local *\[([^\].]*)\], *".*"/
|
109
117
|
podfile = File.join(Pathname.pwd, "Podfile")
|
110
|
-
podfile_str = File.read(podfile)
|
118
|
+
podfile_str = File.read(podfile)
|
119
|
+
|
120
|
+
local_pod_str = podfile_str.match(re).to_s
|
121
|
+
local_pod_lines = local_pod_str.to_s.split("\n")
|
122
|
+
local_pod_lines = local_pod_lines.map do |s|
|
123
|
+
"# #{s}"
|
124
|
+
end
|
125
|
+
local_pod_str = local_pod_lines.join("\n")
|
126
|
+
local_pod_str << "\n"
|
127
|
+
pod_remote_str.insert(0, local_pod_str)
|
128
|
+
|
129
|
+
podfile_str = podfile_str.gsub(re, pod_remote_str)
|
111
130
|
File.open(podfile, "r+") do |podfile|
|
112
131
|
podfile << podfile_str
|
113
132
|
end
|
114
|
-
puts "替换成功".
|
133
|
+
puts "替换成功".tdf_blue
|
115
134
|
end
|
116
135
|
|
117
136
|
def find_repo_with_pod(pod_name)
|
@@ -1,30 +1,30 @@
|
|
1
1
|
class String
|
2
2
|
# colorization
|
3
|
-
def
|
3
|
+
def tdf_colorize(color_code)
|
4
4
|
"\e[#{color_code}m#{self}\e[0m"
|
5
5
|
end
|
6
6
|
|
7
|
-
def
|
8
|
-
|
7
|
+
def tdf_red
|
8
|
+
tdf_colorize(31)
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
12
|
-
|
11
|
+
def tdf_green
|
12
|
+
tdf_colorize(32)
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
|
15
|
+
def tdf_yellow
|
16
|
+
tdf_colorize(33)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
|
19
|
+
def tdf_blue
|
20
|
+
tdf_colorize(34)
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
24
|
-
|
23
|
+
def tdf_pink
|
24
|
+
tdf_colorize(35)
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
28
|
-
|
27
|
+
def tdf_light_blue
|
28
|
+
tdf_colorize(36)
|
29
29
|
end
|
30
30
|
end
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gaijiaofan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|