cocoapods-hd 0.0.4 → 0.0.5
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/cocoapods-hd/command/tag.rb +17 -30
- data/lib/cocoapods-hd/gem_version.rb +1 -1
- data/lib/cocoapods-hd/tag_util.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbebbaf65a5ed84c38054190ce2122553d9b79b8068ff3b958d2747ad5542fd9
|
4
|
+
data.tar.gz: caad4f5c09f12847ac7909c20959f2e02a14abda509344b2bfae25432ecf81c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37a96008fc62e0f5c3b8d087ebcac385882d0f928b82eee1f67e1df0349f1550f523654deab1096afc4ef1ecb73c41e17d53b22af1418d5290115f8bfa2dee0b
|
7
|
+
data.tar.gz: 349f7aca0788cb4f66e76a6c67a5dda2d13dc0672246be7d3a30fd4ed5e7c4e60252e26779867c869e40e82d41398718b08b9e73c4110344cd12d24faa33c0e2
|
@@ -72,14 +72,12 @@ module Pod
|
|
72
72
|
`pod ipc spec #{pod_name}.podspec >>#{podspec_json_name}`
|
73
73
|
podspec_json_dir = File.join(Dir.pwd, podspec_json_name)
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
UI.puts("HDSourceSpecs目录: #{source_specs_dir}")
|
75
|
+
UI.puts("HDSourceSpecs目录: #{get_source_specs_dir}")
|
78
76
|
|
79
|
-
Dir.chdir(
|
77
|
+
Dir.chdir(get_source_specs_dir)
|
80
78
|
`git pull`
|
81
79
|
|
82
|
-
dest_dir = File.join(
|
80
|
+
dest_dir = File.join(get_source_specs_dir, pod_name, get_tag)
|
83
81
|
|
84
82
|
UI.section("创建目录: #{dest_dir}") do
|
85
83
|
FileUtils.mkdir_p(dest_dir) unless File.directory?(dest_dir)
|
@@ -90,18 +88,12 @@ module Pod
|
|
90
88
|
end
|
91
89
|
|
92
90
|
UI.section("✅ #{podspec_json_name} 上传成功") do
|
93
|
-
|
94
|
-
`git add .`
|
95
|
-
`git commit -m 'add #{pod_name} #{get_tag}'`
|
96
|
-
`git push origin master`
|
91
|
+
TagUtil.upload_origin_sources("添加 #{pod_name}/#{get_tag}")
|
97
92
|
end
|
98
|
-
|
99
93
|
Dir.chdir(module_dir)
|
100
94
|
end
|
101
|
-
unless
|
102
|
-
|
103
|
-
source_repo_path = File.join(module_parent_dir, "HDSourceSpecs")
|
104
|
-
FileUtils.rm_r(source_repo_path)
|
95
|
+
unless File.directory?(cocoapods_repos_dir)
|
96
|
+
remove_git_source_repo
|
105
97
|
end
|
106
98
|
|
107
99
|
unless @beta
|
@@ -111,7 +103,6 @@ module Pod
|
|
111
103
|
delete_tag(beta_tag)
|
112
104
|
end
|
113
105
|
end
|
114
|
-
|
115
106
|
end
|
116
107
|
end
|
117
108
|
|
@@ -136,6 +127,7 @@ module Pod
|
|
136
127
|
|
137
128
|
# 移除tag
|
138
129
|
def delete_tag(tag)
|
130
|
+
|
139
131
|
UI.puts "🍉 开始删除tag: #{tag}"
|
140
132
|
if TagUtil.exist_tag(tag)
|
141
133
|
TagUtil.git_delete_tag(tag)
|
@@ -157,25 +149,19 @@ module Pod
|
|
157
149
|
pod_name = rip.to_s.gsub(".podspec", "")
|
158
150
|
UI.puts "pod_name: #{pod_name}"
|
159
151
|
|
160
|
-
|
161
|
-
Pod::UI.puts "本地 HDSourceSpecs not found"
|
162
|
-
break
|
163
|
-
end
|
152
|
+
source_specs_dir = get_source_specs_dir
|
164
153
|
|
165
|
-
|
154
|
+
pod_tag_path = File.join(source_specs_dir, pod_name, tag_name)
|
166
155
|
|
167
|
-
unless File.exist?(
|
156
|
+
unless File.exist?(pod_tag_path)
|
168
157
|
UI.warn "❌ 本地HDSourceSpecs不包含#{pod_name}的#{tag_name}标签, 请先执行 pod repo update"
|
158
|
+
remove_git_source_repo
|
169
159
|
break
|
170
160
|
end
|
171
|
-
FileUtils.remove_dir(
|
172
|
-
Dir.chdir(
|
173
|
-
# UI.puts "切换到:#{Dir.pwd}"
|
161
|
+
FileUtils.remove_dir(pod_tag_path)
|
162
|
+
Dir.chdir(source_specs_dir)
|
174
163
|
UI.section("✅ #{pod_name} #{tag_name} 标签删除成功 !!!") do
|
175
|
-
|
176
|
-
`git add .`
|
177
|
-
`git commit -m '删除#{pod_name}/#{tag_name}'`
|
178
|
-
`git push origin master`
|
164
|
+
TagUtil.upload_origin_sources("删除 #{pod_name}/#{tag_name}")
|
179
165
|
end
|
180
166
|
|
181
167
|
end
|
@@ -185,8 +171,9 @@ module Pod
|
|
185
171
|
File.join(Dir.home, ".cocoapods/repos/HDSourceSpecs")
|
186
172
|
end
|
187
173
|
|
188
|
-
def
|
189
|
-
File.
|
174
|
+
def remove_git_source_repo
|
175
|
+
source_repo_path = File.join(File.dirname(Dir.pwd), "HDSourceSpecs")
|
176
|
+
FileUtils.rm_r(source_repo_path)
|
190
177
|
end
|
191
178
|
|
192
179
|
def run
|
@@ -29,6 +29,14 @@ module Pod
|
|
29
29
|
false
|
30
30
|
end
|
31
31
|
|
32
|
+
# 上传Sources
|
33
|
+
def self.upload_origin_sources(commit_desc)
|
34
|
+
`git status -s`
|
35
|
+
`git add .`
|
36
|
+
`git commit -m '#{commit_desc}'`
|
37
|
+
`git push origin master`
|
38
|
+
end
|
39
|
+
|
32
40
|
def self.check_branch_include_tag(tag)
|
33
41
|
branch_name = `git symbolic-ref --short -q HEAD`
|
34
42
|
if branch_name.to_s.strip == "master"
|