cocoapods-tdf-bin 0.0.23 → 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
|
@@ -72,7 +72,7 @@ module Pod
|
|
72
72
|
v
|
73
73
|
end
|
74
74
|
arg = arg.join(" ")
|
75
|
-
puts "============== #{path} 开始执行 git #{arg} 命令 ==============".
|
75
|
+
puts "============== #{path} 开始执行 git #{arg} 命令 ==============".tdf_blue
|
76
76
|
puts `git -C #{path} #{arg}`
|
77
77
|
end
|
78
78
|
end
|
@@ -86,7 +86,7 @@ module Pod
|
|
86
86
|
git_url = `git -C #{path} remote get-url --push origin`
|
87
87
|
current_branch = `git -C #{path} branch --show-current`.delete!("\n")
|
88
88
|
group_name = get_group_with_repo(git_url)
|
89
|
-
puts "============== #{name} 当前分支 #{current_branch} 当前组 #{group_name} ==============".
|
89
|
+
puts "============== #{name} 当前分支 #{current_branch} 当前组 #{group_name} ==============".tdf_blue
|
90
90
|
|
91
91
|
group_key = "#{group_name}&&#{current_branch}"
|
92
92
|
repo_arr = group_map[group_key]
|
@@ -108,17 +108,29 @@ module Pod
|
|
108
108
|
end
|
109
109
|
group = key.split("&&")[0]
|
110
110
|
branch = key.split("&&")[1]
|
111
|
-
pod_remote_str << " ], \"#{branch}\", \"#{group}\"\n\n"
|
111
|
+
pod_remote_str << " ], \"#{branch}\", \"#{group}\" \n\n"
|
112
112
|
end
|
113
|
-
puts "将 local_batch 依赖 替换为 \n#{pod_remote_str}".
|
113
|
+
puts "将 local_batch 依赖 替换为 \n#{pod_remote_str}".tdf_blue
|
114
114
|
|
115
115
|
# 替换 podfile 中的local batch
|
116
|
+
re = / *batch_pod_local *\[([^\].]*)\], *".*"/
|
116
117
|
podfile = File.join(Pathname.pwd, "Podfile")
|
117
|
-
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)
|
118
130
|
File.open(podfile, "r+") do |podfile|
|
119
131
|
podfile << podfile_str
|
120
132
|
end
|
121
|
-
puts "替换成功".
|
133
|
+
puts "替换成功".tdf_blue
|
122
134
|
end
|
123
135
|
|
124
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
|